Escaping of html characters

ahoj!
in an sql report i have to show text messages that include sometimes special html characters like <. is there an oracle function to convert this characters in the format & #60; (without the blank)? i don't want to replace all the special characters by myself.
thanks!
ciao,
christian
Edited by: Christian Ropposch on Apr 8, 2009 1:39 PM
Edited by: Christian Ropposch on Apr 8, 2009 1:40 PM

Hi Christian R.!
If I understood right then you are using APEX. HTP and HTF are included with Oracle and APEX. You don't need the Application Server.
regards

Similar Messages

  • How to get an xml string into a Document w/o escaping mark-up characters?

    Hi,
    I am using one of the latest xerces using Java. I am pretty sure I am using xerces-2.
    I have an existing Document and I am trying to add more content to it. The new content itself is xml string. I am trying to insert this xml string into the document using document.createTextNode. I am able to insert, but somewhere it is escaping the mark-up characters (<,>,etc). When I convert the document into String, I can see, for example, <userData> instead of <userData>.
    There is an alternative option to accomplish this by creating a new document with this xml string, get the root element, import this element into my document. Execution time for this procedure is very high - means, this is very bad in terms of time-wise performance.
    Can any help on how to accomplish this (bringing an xml string into a document without escaping mark-up characters) in time-efficient way.

    So you want to treat the contents of the string as XML rather than as text? Then you have to parse it.
    Or if your reason for asking is just that you don't like the look of escaped text, then use a CDATA section to contain the text.

  • Special HTML Characters

    Hi,
    I encountered a problem with regards to the display of special HTML characters(chr 155). Crystal was not able to correctly display the cahracters. Instead a blank space was displayed. In addition to, when the report is exported to PDF, it is displayed as boxes.
    Is there a way to handle display of special HTML chars in crystal?
    Thanks

    Crystal HTML interpreter is very limited and has been same for years, so it seems unlikley it will chnage any time soon.
    As its a specific character that is failing use a replace formul to remove the long dash html and replace with a short dash html which I guess Crystal will recognise.
    Replace(yourfield, 'longdashhtml', 'shortdashhtml')
    Ian

  • Parsing HTML characters (e.g. &nbsp)

    Hi
    Apologies if I'm missing something obvious, I haven't been able to find an answer searching the API or Forums...
    I'm parsing HTML documents (currently as Strings) to extract certain information. Is there an easy way to replace all special HTML characters such as   < etc. to a space or < respectively without having to do a string replace on every possible HTML character?
    I know there's an HTML parser in swing but that seems to be geared towards creating an HTML editor.
    Any help would be appreciated!

    There are also a number of open source or shareware programs, such as TidyHTML, that clean-up and parse existing HTML. Check out Sourceforge or www.downloads.com.
    - Saish

  • Sorting values by escaping the html tags

    Hi Friends,
    My problem is described below...
    I am facing an issue where I need to sort (main title/ alternate title) by escaping the html tags.
    eg 'Amex' should always be before 'Singer'
    Amex in DB is like Amex.
    Syngo in DB is like &lt;i&gt;Singer&lt;/i&gt
    something can be --- <i>hello<i>
      sql.append("SELECT DISTINCT NVL(ItemDocMeta.xMainTitle, ItemDocMeta.xAlternateTitle) AS generatedPageTitle,");
    other conditions
    // order by
                sql.append(" ORDER BY LOWER(generatedPageTitle) ASC");
    Is there any SQL function that can make it easier?
    I tried using regex in the ith order by clause, but it doesnt work until i keep it in the select part. And I am unable to use regex in the select part with distinct.
    Thanks

    For example :
    SQL> set scan off
    SQL>
    SQL>
    SQL> with sample_data as (
      2      select 'again sort a column' str from dual union all
      3      select '<i>sort</i> a column' from dual union all
      4      select '&lt;i&gt;resort&lt;i&gt;' from dual
      5  )
      6  select str
      7  from sample_data
      8  order by regexp_replace(
      9             utl_i18n.unescape_reference(str)
    10           , '</?[^>]+>'
    11           )
    12  ;
    STR
    again sort a column
    &lt;i&gt;resort&lt;i&gt;
    <i>sort</i> a column

  • Inconsistent behaviour (I think) with escaping of invalid characters. Select in MSSQLMS escapes fine but assigning to an xml typed variable fails.

    -- How can I assign an xml typed variable and take advantage of the automatic escaping of invalid characters?
    -- This query escapes the character fine in MSSQLMS
    SELECT * FROM (SELECT CAST(0x1B00 AS NVARCHAR(128)) AS TestCharacter) MyTable FOR XML auto
    <MyTable TestCharacter="&#x1B;" />
    -- This fails in MSSQLMS and in a similar production procedure.
    DECLARE @MyXml XML
    SET @MyXML = (SELECT * FROM (SELECT CAST(0x1B00 AS NVARCHAR(128)) AS TestCharacter) MyTable FOR XML auto)
    Msg 9420, Level 16, State 1, Line 2
    XML parsing: line 1, character 30, illegal xml character
    Scott Mitchell

    Thanks for the reply. I looked at casting to varbinary but didn't want to cast the large strings that have these characters in them. Sorry for not mentioning that. My example above is simplified. The text isn't only in an attribute and can be quite large.
    I want to be able to read the text by just looking at the xml. 
    I really would like the escaped form:
    &#x1B; for all the invalid characters. 
    Scott Mitchell

  • HTML characters display incorrectly in Firefox

    Special HTML characters like ∠ and ← and ∝ (etc.) do not display as they should in Firefox on my Mac.
    I messed with Font Book earlier today, and though I don't think I made any fatal changes, I think that might have caused this problem (though certain symbols like ♥ had never shown up correctly).
    However, all of these characters display perfectly in Safari. See:
    http://www.plisher.org/safari.jpg
    http://www.plisher.org/firefox.jpg
    How might I fix this?

    Well, I just launched Firefox and opened this page in it. The angle, arrow and whatevertheotherthing is all displayed correctly, the heart however showed up in Firefox as a perpendicular line.
    I'm using Firefox 2.0.0.4, with the default font set to Geneva.
    Francine
    Francine
    Schwieder

  • CF8 - XmlFormat not escaping High ASCII characters

    In CF8, we have a problem where XmlFormat is not escaping
    High ASCII characters. This was working just fine on our CF7
    instance, but in CF8, it is not escaping all characters. I am aware
    of the long-standing problem with escaping Windows-1252 characters,
    but now we are experiencing an issue with basic high ASCII
    characters, like chr(233) and chr(244). Is anyone else experiencing
    this issue? We have not installed Update 1 to CF8 yet. I don't see
    a fix for this in the release note, but any word on if this is
    fixed by the updater?
    Here is a test to demonstrate the issue:
    <cfset myString = "The Islamic Republic of Mauritania's
    (République Islamique de Mauritanie) 2007 estimated population
    is 3,270,000. Cote d'Ivoire and Côte d'Ivoire">
    <cfset myNewString = XmlFormat(myString)>
    <cfoutput>#myNewString#</cfoutput>

    BKBK,
    Thanks for the info. Adding the processingdirective does help
    show that these characters are being escaped, however, the behavior
    has changed somewhat between CF7 and CF8, as we were not using a
    processingdirective in CF7, and this was working as advertised.
    Where this is giving us a problem is after we create an XML
    document using CFXML, (ensuring that we XmlFormat any strings), we
    then validate that document against a schema, and we are all of a
    sudden getting errors during validation for invalid characters
    within the XML. We are using ToString() after creating the XML
    document with CFXML, and our process is the same as we were using
    in CF7. That is why I was curious if anyone else was having this
    same issue... because something definitely changed between CF7 and
    CF8 with XML processing.

  • [svn] 3590: Replace invalid html characters

    Revision: 3590
    Author: [email protected]
    Date: 2008-10-13 07:29:43 -0700 (Mon, 13 Oct 2008)
    Log Message:
    Replace invalid html characters
    Checkin Test Passed: Yes
    QA: No
    Bug:
    Doc: No
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutItem.as

    Try the HtmlEditFormat function built into ColdFusion.
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_h-im_04.html#4 744272

  • How to escape special xml characters in ALSB

    Hi
    Can some one tell me how to replace special xml characters < ,> with &lt; and &gt;
    I have xml node like below
    <payload>
    <RatingDetails>
    <Action>Add</Action>
    </payload>
    Using fn-bea:serialize i got xml string as
    <payload><RatingDetails><Action>Add</Action></payload>
    I want output as below
    <payload>&lt;RatingDetails&gt;&lt;Action&gt;Add&lt;/Action&gt;</payload>
    Appreciate your help
    Thanks in Advance

    when i use fn-bea:serialize my request xml node converted to xml string.To that string i had escaped special xml characters.
    Original request:
    <abc>
    <a1 >123</a1>
    <payload>
    <d>345</d>
    <e><678></e>
    </payload>
    </abc>
    After using serialize it became as below (everything in one line)
    <abc><a1>123</a1><payload><d>345</d><e><678></e></payload></abc>
    then i used java callout for replacing special xml chars in payload element,
    now my request is
    <abc><a1>123</a1><payload><![CDATA[& lt;d& gt;345& lt;/d& gt;& lt;e& gt;& lt;678& gt;& lt;/e& gt;]]></payload></abc>
    i dont want my payload data to be enclosed within CDATA but by default i am getting it when i run my xquery for generating request.
    This might be because & will not get parsed in xml parser so enclosing evrything in CDATA.
    Need solution to remove CDATA and send the payload data as it is..

  • Escaping html characters

    Hello all,
    I am creating a flex chat app. This communicates with my own
    chat server.
    Now I want to know what is the best way to escape characters?
    I send all data in a XML document to the server, so if I type
    a message: <i>test</i> the text will appear italy, as
    it is not escaped.
    If I use escape, it will escape to a code that the Text
    control not is able to read.
    I just want to know which function will replace < in
    &lt; > in &gt; and & in &amp;.
    Thanks!

    I have tried esc ape and unes cape.
    But these are my results:
    var Str: String = '<foo>rock & roll</foo>';
    Alert.show(esc ape(Str));
    This will come to:
    %3Cfoo%3Erock%20%26%20roll%3C/foo%3E
    Thats fine for sending data, but putting it back with un esc
    ape will just give me the original back (as expected).
    But I want my < to be &lt; or the equivelant ascii
    code &#100;
    In PHP you use htmlentities or htmlencode, but in Flex is a
    mystery.
    Sorry, didn't read your post properly, I think I will have to
    come up with my own replace function then :(

  • Escaping carriage return characters in textarea

    Hi all,
    I have a HTML form containing a textarea field which users might us the carriage return.
    This form is then submitted to a processing servlet which saves the data to the database.
    Subsequently, I have another page which will retrieve the data using JDBC and and display these in HTML.
    Here's the problem:
    How do I replace the carriage return characters (seems from the database that there are 2 of them) with <br>?
    I've tried using the String.replaceAll("\r\n", "<br>"), but it didn't work :-(
    Thanks!

    Becuase you enter your patterns as expressions where some characters are used as control characters, and then have to esacpe some of the control characters in the expressions when you enter them as java strings.
    So the expression is actually \r\n if you let a user enter it into a textfield, but you have to escape the \ if you write it as a String in the source code (since \ is an escape characters in strings)
    /Kaj

  • How to display, translate or remove html characters

    Hi,
    I need the ability to translate or remove the characters below to display properly in oracle apex text area. Anyone know how to do this?
    Apex 4
    &lt;p&gt;1985 World Champ. U.19 - Gold, &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&lt;strong&gt;1986 World Champ. - Gold,&lt;/strong&gt; &lt;/span&gt;1987 Pan American Games - Gold, 1987 North American Champ. - Gold, 1987 World Cup - Gold, &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&lt;strong&gt;1989 World Champ. - Gold,&lt;/strong&gt;&lt;/span&gt; 1990 Goodwill Games - Gold, 1990 World Cup - Gold, 1991 Playa Giron - Gold, 1991 Pan American Games - Gold, &lt;span style=&quot;color: rgb(255, 0, 255);&quot;&gt;&lt;strong&gt;1991 World Champ. -
    Thanks
    Dean

    Assuming I've understood the requirement:
    SQL> with t as (
      2    select '<p>1985 World Champ. U.19 - Gold, <span style="color: rgb(255, 0, 255);"><strong>1986 World Champ. - Gold,</strong> <
    /span>1987 Pan American Games - Gold, 1987 North American Champ. - Gold, 1987 World Cup - Gold, <span style="color: rgb(255, 0, 255)
    ;"><strong>1989 World Champ. - Gold,</strong></span> 1990 Goodwill Games - Gold, 1990 World Cup - Gold, 1991 Playa Giron - Gold, 199
    1 Pan American Games - Gold, <span style="color: rgb(255, 0, 255);"><strong>1991 World Champ. - ' s from dual)
      3  select
      4            regexp_replace(s, '<[^>]*>') removed
      5          , htf.escape_sc(s) escaped
      6  from
      7*           t
    SQL> /
    REMOVED                                  ESCAPED
    1985 World Champ. U.19 - Gold, 1986 Worl &lt;p&gt;1985 World Champ. U.19 - Gold,
    d Champ. - Gold, 1987 Pan American Games &lt;span style=&quot;color: rgb(255, 0,
    - Gold, 1987 North American Champ. - Go 255);&quot;&gt;&lt;strong&gt;1986 World
    ld, 1987 World Cup - Gold, 1989 World Ch Champ. - Gold,&lt;/strong&gt; &lt;/span&
    amp. - Gold, 1990 Goodwill Games - Gold, gt;1987 Pan American Games - Gold, 1987
    1990 World Cup - Gold, 1991 Playa Giron North American Champ. - Gold, 1987 World
    - Gold, 1991 Pan American Games - Gold,  Cup - Gold, &lt;span style=&quot;color:
    1991 World Champ. -                      rgb(255, 0, 255);&quot;&gt;&lt;strong&g
                                             t;1989 World Champ. - Gold,&lt;/strong&g
                                             t;&lt;/span&gt; 1990 Goodwill Games - Go
                                             ld, 1990 World Cup - Gold, 1991 Playa Gi
                                             ron - Gold, 1991 Pan American Games - Go
                                             ld, &lt;span style=&quot;color: rgb(255,
                                              0, 255);&quot;&gt;&lt;strong&gt;1991 Wo
                                             rld Champ. -(Inconsistent behaviour by the Jive forum software means it isn't displaying the difference in the ESCAPED result properly...)

  • Regex: Escaping in HTML

    Hi All,
    I need to escape certain characters on our jsp pages to make them w3c compliant.
    The characters I need to escape are
    "  to " < to &lt; > to &gt; & to & (but not when & is followed by # (eg &&#35; would NOT be escaped).
    EG
    Raw:  John & Mary are > then Sam & Helen but < George & Michelle -- &#27222;
    Converted:  John & Mary are & gt; then Sam & Helen but & lt; George & Michelle  --- ;&#27222; I've tried to use PerlUtils but to no avail (cannot work out how to tell it not to escape the &# sequence).
    Can you guys help me with to accomplish this with javas regex package (or with 1.4 String class)??
    Thanks!

    Thanks Uncle Alice! You are the regexp king (or queen?)Of the two, "king" would be more appropriate, but I really prefer "poobah". :-)
    I've been writing java apps for 5 years now and I have never touched
    regex. I did do some google'ing but really couldnt find real examples
    that were easy to follow.I know what you mean. This site has a pretty good tutorial, but the examples are a bit too abstract. I was hoping the Habibi book from APress would fill that void (it was originally titled Real World Regular Expressions with Java), but poor examples turned out to be the least of its problems. Your best bet is still Friedl's book -- good examples are the least of its virtues.

  • String auto-converts HTML characters?

    Hi all, I have an XML document that contains a field like
    this:
    <someHTML>&lt;b&gt;ThisIsBolded&lt;/b&gt;</someHTML>
    Now, I want to put this correctly-rendered HTML into the
    htmlText portion of a Text tag. Which I try to accomplish using the
    following:
    var nodeHTML:String = node.someHTML.toString();
    trace(nodeHTML); // Output: <b>ThisIsBolded</b>
    (what!? I didn't replace anything!)
    nodeHTML.replace("<","&lt;").replace(">","&gt;");
    trace(nodeHTML); // Output: <b>ThisIsBolded</b>
    (what!? replacement didn't do anything!)
    myText.htmlText += nodeBody + "\n"; // Output: Plaintext
    output, no bolding! But also no tags...?
    Does anyone know what is going on? It seems like I can't
    display HTML in the htmlText property. Any help would be
    appreciated.

    Post Author: V361
    CA Forum: General
    The maximum length of a String constant, a String value held by a String variable, a String value returned by a function or a String element of a String array is 65,534 characters.
    The maximum size of an array is 1000 elements.
    The maximum number of arguments to a function is 1000. (This applies to functions that can have an indefinite number of arguments such as Choose).
    Not sure about the HTML ?

Maybe you are looking for