Replace HTML tags in RTE

Hi All,
               I've requirement that I need to replace the html tags in RTE, I checked find and replace plugin, which only replace the text not the tags. The CQ.form.rte.SearchableDocument returns the plain text. Can anybody tell me how to replace the tags?, is there any existing plugin's available ?
Thanks in advance
    Ganesh

Hi Ganesh,
    You can configure the rich text editor to use semantic markup, so that the bold=strong and italic=em will be modified in the html out. Not sure it applies for other tags. Give a try.
http://forums.adobe.com/message/4652639#4652639
Thanks,
Sham

Similar Messages

  • Replace HTML tags within column values

    Hi Gurus,
    I have a requirement where I have some text which has HTML tags inserted within it and I need to insert either Presentation variable or a GO URL replacing that tag. Problem is that this text is value of a column from table. It is not something which I type( because the text can change dynamically). e.g
    Column header:  Main Text
    Row1:            <<COMPANY_NAME>>
    Row2:           As of <<AF_OF_DATE>>
    instead of <<COMPANY_NAME>> and <<AS_OF_DATE>>, I need to insert amounts from another table which have this unique tags and associated amounts. Can this be done?
    I have to these columns in different places throughout the report in narrative views. e.g
    1st narrative view will have only column 1 and row 1 and row 2.. 2nd narrative view will have only column 3 and row1...
    This is really really important part of a report. So please help me out with ideas.
    Thanks,
    Dan

    I tried calling the column in a narrative view and the result looks like :
    As of <<AS_OF_DATE>>. how can I replace "<<AS_OF_DATE>>" with a value?

  • APEX 3.1 replaces HTML tags in error message automatically

    Hello!
    I have a problem: we use sometimes HTML links or even JavaScript in error messages. In older versions of APEX it works, but now we upgraded to 3.1 and in all those messages HTML tags are replaced so instead of link we get a plain HTML in a message.
    Are there any possibilities to turn this option off or what can we do to solve this problem?
    Regards,
    Maksim

    In a page process we use raise_application_error(-20547, 'Go to GOOGLE') and in a Process Error Message
    we use constuction Error: #SQLERRM#. Then on an standard error page we see instead of Error: Go to Google html source. Thats it. In template in Error Page Template Control section we use substitution #MESSAGE#

  • Replacing HTML tags using HTMLEditorKit etc.

    Hi
    Not sure if this is the best place to ask this. I've searched without finding much.
    Basically I am trying to create a HTML template system for output. User's can change the templates to change the program output.
    The templates are basic HTML with custom tags inserted, that reside in a templates directory. For example, a simple template might be:
    <html><body>
    <table width="100%"><tr><td width="25%">Here is the output:</td>
    <td> <insertOutputHere> </td>
    </tr></table>
    </body></html>
    ^^ Users would be able to edit these template .htm files to affect the output .htm files. For instance, changing where the <insertOutputHere> tag is, or formatting the table it is output to.
    I am using the Swing HTMLDocument, HTMLWriter, HTMLEditorKit classes to load and parse the .htm files, iterate the tags and replace any custom tags (defined in code) with the program output. I have been able to locate these custom tags no problem, but I don't know how to replace this tag entirely with my output (Which will be formatted HTML string). I have been trying to use the insertBefore, insertAfter methods with limited success. In particular I have an 'include' custom tag which includes other files by recursion - it works except the <include> tag is not removed, and depending on which insert method I use, it usually goes into an infinite loop of parsing the <include> tag WITHOUT removing it, then picking it up again when its done.
    Basically I'm looking for any advice as to how to go about COMPLETELY REPLACING these tags with a well structured HTML string. I can post some code if need be but I barely comprehend what I've done, LOL.
    TIA

    I've looked over my mess of comments :)
    setOuterHTML is what I was previously using and it was quite unpredictable at times, as far as I could tell it is very strict with it's requirements for structured HTML (EG no floating line breaks, everything must be "paragraph-ised" which b0rks up the layout) and I can't rely on anyone using/extending these classes to write well structured HTML.
    I remember the problems being quite odd, such as the output for one custom tag being displayed twice for some and not at all for others, and while it isn't critical data, it was still displayed in a way that it could be interpreted as correct - I just knew it wasn't.
    So I dropped setOuterHTML to try insertAfterEnd - this leaves the tags in there and, like roughly explained above, it would pick up tags infinitely because they were not being replaced.
    Here is a relevant method to give a better idea of what I've done:
           public HTMLDocument parseHTMLfile(String filename, Custom_HTML_Tag tags[]) {
          //create a document
             HTMLDocument doc = (HTMLDocument)kit.createDefaultDocument();
             fileDepth++;
             try {
             //read in the file
                BufferedReader rd = new BufferedReader(new FileReader(filename));
                kit.read(rd, doc, 0);
                if (tags != null) {
                //replace tags with page content
                   ElementIterator it = new ElementIterator(doc);
                   Element e;
                   while ((e = it.next()) != null) {
                   //look for includes
                      if (e.getName().equals("include")) {
                         if (fileDepth >= 5){
                         //WARNING:
                            System.out.println("fileDepth has reached 5, include may be recursive. aborting.");
                            continue;
                         String href = (String)e.getAttributes().getAttribute(HTML.Attribute.HREF);
                      //grab parent of current file (IE the folder in which it sits)
                         File f = new File(filename);
                         String include = f.getParent() + sep + href;
                         f = new File(include);
                         if (f.exists()) {
                            HTMLDocument htmld = parseHTMLfile(include, tags);
                            StringWriter sw = new StringWriter();
                            HTMLWriter w = new HTMLWriter(sw, htmld);
                            w.write();
                            doc.setOuterHTML(e, sw.toString());
                         else {
                         //couldnt find include file - warning
                      for (int i=0; i < tags.length; i++) {
                         if (e.getName().equals(tags.getName())) {
    //doc.setOuterHTML(e, tags[i].getText());
    doc.insertAfterEnd(e, tags[i].getText());
    //System.out.println("found tag: " + tags[i].getName() + ": " + tags[i].getText());
    catch (BadLocationException ble) {// cant happen?
    System.err.println("ERROR (" + 999 + "): Could not parse document " + filename + "; BadLocationException");
    System.err.println(ble);
    catch (FileNotFoundException fnf) {
    System.err.println("ERROR (" + 999 + "): Could not parse document " + filename + "; File not found");
    //System.err.println(fnf);
    catch (IOException ioe) {
    System.err.println("ERROR (" + 999 + "): Could not parse document " + filename + "; I/O Error:");
    System.err.println(ioe);
    fileDepth--;
    return doc;
    setInnerHTML kills it with the 'Can not set inner HTML of a leaf' error
    Thanks

  • Replacing html tags in a htmldocument

    Hi Java Gurus
    I have a htmldocument which has the bacjground set to black and foreground to white.
    When i print the document i see the text in white color ( rather invisible).
    I thought the foreground color of the document needs to be changed.
    How can i do this ?
    Thanks in advance
    Naveen

    rest_in_peace wrote:
    You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    Read the FAQ and forum sticky threads for more information on using the forum effectively.
    With APEX we're fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues.
    I have created a form on a table. Now one of the fields in the form is a display only field and its datatype is varchar2.There are a number of different ways of "creating a form on a table" and of making "display only fields". Describe exactly what you mean using actual APEX terminology of regions, items, and their attributes.
    The data in the database column of the field contains html tags which is getting displayed as it is without being parsed. It is not possible for me to edit the data in the table itself since there are thousands of data. So I need a way to display the data with the html tags parsed and not displayed as it is. Please any help would be grealy appreciated. How this is achieved is version-dependent: provide the full APEX version.

  • How to use Microsoft Word's Find and Replace with HTML tags?

    Hello to all!
    I'm trying to figure out how to use the find and replace function in Word to replace html tags. I'd like to be able to change something like this:
    <span class="B01-K-ITAL">random text</span>
    To something like this:
    <em>random text</em>
    I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly.
    Anyone able to lend a hand?

    Here is my latest regular expression with Perl.   I think it matches the spirit of the request in the original post.
    Note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.
    perl -0660pe 's^<[sS][pP][aA][nN]\s+class="B01-K-ITAL"\s*>(.*?)</[sS][pP][aA][nN]>^<em>$1</em>^gs' i.html >|o.html
    input text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <span class="B01-K-ITAL">#1 one line</span> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <span class="B01-K-ITAL">#2 don't be greedy</span> <span class="B01-K-ITAL">$3 multiline text</span> <span class="B01-K-ITAL">#4 multiline tag. I believe html allow a carriage return in white space of tags</span> <span class="B01-K-ITAL">#5 split after the class tag. optional white space</span> <sPan class="B01-K-ITAL">#6 mixed case tag</Span> <p>no text #7</p><span class="B01-K-ITAL"></span> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>
    output text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <em>#1 one line</em> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <em>#2 don't be greedy</em> <em>$3 multiline text</em> <em>#4 multiline tag. I believe html allow a carriage return in white space of tags</em> <em>#5 split after the class tag. optional white space</em> <em>#6 mixed case tag</em> <p>no text #7</p><em></em> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>

  • Displaying content in JSP page, want BR but not other Html tags

    I have a page and am reading files and displaying the contents of the files onto the page in a <div> Oneissue is that in the file the end of line are \n or \r\n whichever operation system. I replaced those with <BR> no problem. Now my issue is that I display that in the JSP page:
    <c:out value="${filecontents}" escapeXml="false" />I use escapeXml so that <BR> will add the line breaks. Now my issue is that the file might contains other HTML tags that I want to display simply as text - I don't want the browser to render the other HTML tags.
    Is there a way to do that? Would I have to replace HTML tags with something special?

    Hmm... your file contains HTML tags, but you don't want the browser to interpret them as HTML tags, right? So the way to do that is to use escapeXml="true" in your c:out element.
    But then that also escapes the <BR> tags that you carefully put in there. And you don't want that. You want the browser to interpret those as HTML tags.
    I guess you can't have it both ways. Can you do something like outputting one line of the file at a time with <c:out ... escapeXml="true"> followed by <br>?

  • Error in my CODE- replace data in html tags in APPLET

    MY REQUIREMENT:
    I'm trying to send html format of output to an excel file....As you can see my data in the td tag had data as: 
    BRANCHOFFICE<125 & BRANCHOFFICE>176 where < is interpreted as an html tag....So I want to replace
    < -> <
    < -> >
    & -> &
    <HTML>
    <table border="1">
    <tr>
    <td>BRANCHOFFICE<125 & BRANCHOFFICE>176</td>
    </tr>
    </table>
    </HTML>
    MY ERROR IN CODE:
    So I'm testing my replace method in a small snippet.........
    So the steps my code works is:
    1)BRANCHOFFICE<125 & BRANCHOFFICE>176 gets converted to
    BRANCHOFFICE<125 & BRANCHOFFICE>176
    2)BRANCHOFFICE<125 & BRANCHOFFICE>176 gets converted to
    BRANCHOFFICE<125 & BRANCHOFFICE>176
    3)when it comes to the third & conversion it goes to a infinte loop....
    CAN U PLS HELP ME TO SOLVE THIS BUG........
    import java.applet.Applet;
    import java.io.*;
    public class escape
    public static void main(String arg[])
    String s1 = "BRANCHOFFICE<125 & BRANCHOFFICE>176";
    System.out.println("s1 = " + escape(s1));
    private static String escape(String s)
    while( true )
    int index = s.indexOf('<');
    if ( index != -1 )
    String before = s.substring( 0, index );
    String after = s.substring( index+1, s.length() );
    s = before + "<" + after;
    continue;
    index = s.indexOf('>');
    if ( index != -1 )
    String before = s.substring( 0, index );
    String after = s.substring( index+1, s.length() );
    s = before + ">" + after;
    continue;
    index = s.indexOf('&');
    if ( index != -1 )
    String before = s.substring( 0, index );
    String after = s.substring( index+1, s.length() );
    s = before + "&" + after;
    continue;
    break;
    return s;
    }

    Jdk 1.4:import java.applet.Applet;
    import java.io.*;
    public class escape
         public static void main(String arg[])
              String s1 = "BRANCHOFFICE<125 & BRANCHOFFICE>176";
              System.out.println("s1 = " + escape(s1));
         private static String escape(String s)
              s = s.replaceAll ("&", "&");
              s = s.replaceAll ("<", "<");
              s = s.replaceAll (">", ">");
              return s;
    }<= Jdk 1.3:import java.applet.Applet;
    import java.io.*;
    public class escape
         public static void main(String arg[])
              String s1 = "BRANCHOFFICE<125 & BRANCHOFFICE>176";
              System.out.println("s1 = " + escape(s1));
         private static String escape(String s)
              s = replace (s, "&", "&");
              s = replace (s, "<", "<");
              s = replace (s, ">", ">");
              return s;
         private static String replace(String original, String find, String replacement) {
              int i=0;
              if ((i=original.indexOf(find)) > -1) return original.substring(0, i) + replacement
                   + replace(original.substring(i+find.length()), find, replacement);
              else return original;
    }

  • Replace function for HTML tags

    Hie Guys,
    I would like to get rid of the HTML tags from a column/object in my report using the "Replace" function. Basically, I want to replace whatever the content is between "<" & ">" i.e. the opening and closing tags. I know I can use the "Pos" function to identify the position of "<" & ">", but I am not sure exactly how to achieve this in Webi. FYI -  "Read content as HTML" & "Read content as Hyperlink" did not resolve the issue. Can anyone please help? Thanks.

    Hi Jeewan,
    It will be very tedious to do this at Webi level.
    I have tried below example. It might help you to work around your issue; however, not completely:
    1. Created an Excel and inserted single value in first column as:
    <html><b>this is yuvraj</b></html>
    2. Used it as source and created a Webi report in Rich client.
    3. Applied SubStr recursively using Pos function and created below variables:
    test : =Substr([column_1]; Pos([column_1];">")+1;Length([column_1]))
    test1: =Substr([test]; Pos([test];">")+1;Length([test]))
    test2 : =Substr([test1]; 0;Pos([test1];"<")-1)
    The output has been attached.

  • RegExp for replacing specific HTML tags.

    Hi All,
    I need to replace some of the HTML tags in flex.
    for eg:-
    in the follwing html i have to replace "span","div" and "a"
    <h2>AAAAAAAAA<br /><span >BBBBBBBBBBB</span></h2><div><p>QQQQQQ</p><p>EE<br />FFFF<br />TTT<br /></p
    <a href="#">Click</a>
    </div>

    input = "yor html string";
    var urlPattern:RegExp = new RegExp("/(<a)(.*)(</a)/","ig");
    var result:String = input.replace(urlPattern, "<b$2</b"); 
    var urlPattern2:RegExp = new RegExp("/(<div)(.*)(</div)/","ig");
    var result2:String = result.replace(urlPattern2, "<table$2</table"); 
    and so on....
    hope this helps ...

  • Replace everything except in html tags

    I have this little piece of code hilighting words in search
    results, however, it obviously replaces text in html tags as well
    and I want it to omit all html. I've also noticed that
    replacenocase replaces the case of my words...while it does search
    for words no matter the case, I sure wish it wouldn't replace the
    case of the original text. Any tips would be greatly appreciated.
    <cfset variables.hiliteSummary =
    ReplaceNoCase(siteSearch.summary,url.criteria,"<span
    class=searchHilite>#url.criteria#</span>","ALL")>

    to fix your issue with case, use a rereplace and
    backreferences:
    rereplaceNoCase(siteSearch.summary, '(#url.criteria#)',
    '<span class="searchHilite">\1</span>', 'all')

  • Remove HTML tags without REPLACE

    Hello,
    I have a simple query that returns some data, but the result could have html tags. I don't want to keep using REPLACE because sometimes I receive a tag that is not included in the REPLACE function. Is there is a way to do that, may be using some XML code?
    Thank you

    With a CTE
    like that 
    ALTER FUNCTION dbo.fnHtmlStripFreeLight 
    @inputStringCleaned VARCHAR(MAX) /*,@inputStringCleaned2 VARCHAR(MAX),@inputStringCleaned3 VARCHAR(MAX),
    @inputStringCleaned4 VARCHAR(MAX),@inputStringCleaned5 VARCHAR(MAX),
    @inputStringCleaned6 VARCHAR(MAX),
    @inputStringCleaned7 VARCHAR(MAX),
    @inputStringCleaned8 VARCHAR(MAX),@inputStringCleaned9 VARCHAR(MAX), @inputStringCleaned10 VARCHAR(MAX),@inputStringCleaned11 VARCHAR(MAX),
    @inputStringCleaned12 VARCHAR(MAX),
    @inputStringCleaned13 VARCHAR(MAX), @inputStringCleaned14 VARCHAR(MAX)*/
    RETURNS @freeHtml TABLE (
    col1 VARCHAR(MAX)/*,col2 VARCHAR(MAX),col3 VARCHAR(MAX),col4 VARCHAR(MAX),col5 VARCHAR(MAX),
    col6 VARCHAR(MAX),
    col7 VARCHAR(MAX),col8 VARCHAR(MAX),col9 VARCHAR(MAX),
    col10 VARCHAR(MAX),
    col11 VARCHAR(MAX), col12 VARCHAR(MAX),
    col13 VARCHAR(MAX),col14 VARCHAR(MAX)*/
    AS 
    BEGIN 
        DECLARE @output VARCHAR(MAX)=''/*, @output2 VARCHAR(MAX)='',@output3 VARCHAR(MAX)='', @output4 VARCHAR(MAX)='',@output5 VARCHAR(MAX)='', @output6 VARCHAR(MAX)='',@output7 VARCHAR(MAX)=''
    DECLARE @output8 VARCHAR(MAX)='', @output9 VARCHAR(MAX)='',@output10 VARCHAR(MAX)='', @output11 VARCHAR(MAX)='',@output12 VARCHAR(MAX)='', @output13 VARCHAR(MAX)='',@output14 VARCHAR(MAX)=''*/
        DECLARE @max_recursion INT
       SELECT @max_recursion =MAX(dim)
       FROM (SELECT dim
        FROM (VALUES (LEN(@inputStringCleaned))/*,(LEN(@inputStringCleaned2 )),
     (LEN( @inputStringCleaned3)),(LEN(@inputStringCleaned4)),(LEN(@inputStringCleaned5)),(LEN(@inputStringCleaned6)),(LEN(@inputStringCleaned7)),(LEN(@inputStringCleaned8))
     ,(LEN(@inputStringCleaned9)),(LEN(@inputStringCleaned10)),(LEN(@inputStringCleaned11)),(LEN(@inputStringCleaned12)),(LEN(@inputStringCleaned13)),(LEN( @inputStringCleaned14))*/
     ) as L (dim)
    ) as Q
        ;WITH Split
        AS(
            SELECT 
                1 AS stpos, 
                SUBSTRING(@inputStringCleaned,1,1) as Stream1, 
    SUBSTRING(@inputStringCleaned,2,1) as StreamNext, 
                CASE  WHEN  SUBSTRING(@inputStringCleaned,1,1) IN ('<','>') THEN 0 ELSE 1 END as isShow1
             /*   SUBSTRING(@inputStringCleaned2,1,1) as Stream2, 
    SUBSTRING(@inputStringCleaned2,2,1) as StreamNext2, 
                CASE  WHEN SUBSTRING(@inputStringCleaned2,1,1) IN ('<','>') THEN 0 ELSE 1 END as isShow2*/
            UNION ALL
            SELECT 
                      stpos+1,        -- premier flux
    StreamNext, 
    SUBSTRING(@inputStringCleaned,stpos+2,1),
                          CASE  WHEN StreamNext IN ('<','>') THEN 0
                                      WHEN Stream1 IN ('>') AND isShow1 = 0 THEN 1
                                      WHEN Stream1 NOT IN ('<','>') AND isShow1 = 1 THEN 1  ELSE 0 END,
                                      -- second flux
    /*  StreamNext2,
                                      SUBSTRING(@inputStringCleaned2,stpos+2,1)
                          CASE  WHEN StreamNext2 IN ('<','>') THEN 0
                                      WHEN Stream2 IN ('>') AND isShow2 = 0 THEN 1
                                      WHEN Stream2 NOT IN ('<','>') AND isShow2 = 1 THEN 1  ELSE 0 END */
            FROM Split
            WHERE stpos <= @max_recursion
    SELECT @output+= CASE WHEN isShow1  = 1 THEN Stream1    ELSE '' END FROM Split  OPTION (MAXRECURSION 8001)
    SELECT @output = REPLACE(@output, '&nbsp;','')
    INSERT INTO @freeHtml
    SELECT CASE  WHEN @inputStringCleaned IS NULL THEN CAST(NULL as VARCHAR) ELSE @output END
    RETURN
    END

  • HTML Tags not moved in PDF

    Hello,
    I would like to print a report as a PDF and use the BI Publisher.
    This functions so far also quite well, only I have the problem
    I pass a HTML formatted text from a field CLob
    and with the PDF output the HTML tags are not moved.
    In the PDF document the HTML tags stands instead of a formatted heading,
    e.g.
    <*h1> This is the heading <*/h1> (without stars)
    What I must set / make with it I also a formatted one
    Heading agrees?
    Somebody an idea?
    Edited by: user10460383 on 14.09.2009 06:16
    Edited by: user10460383 on 14.09.2009 06:17

    True - a PDF isn't going to support HTML encoding. HTML will just be seen as more text, and displayed that way.
    You can strip out HTML tags fairly easily with a regular expression in your query SQL - this simply looks for text between < and > characters, and removes it. That should work for basic HTML formatting tags, but it isn't 100% (it won't handle <script> blocks correctly, for instance).
       select regexp_replace(myHTML, '<[^>]*>', '') as myText
       from myTable... Implementing a method to convert the HTML formatting into RTF formatting is also possible, but not a trivial task - you'd effectively have to replace each HTML tag with an RTF equivalent -- eg, replace <H1> with the RTF code to make a larger font, replace </H1> with RTF code to return the font to normal... etc...

  • How can I eliminate HTML tags from Oracle Text Snippet?

    I perform a search on many tables and on many columns of those tables.
    Some of those columns are VARCHAR2 and some CLOB.
    Also, some of the searchable data are HTML and some are plain text.
    My problem is that ctx_doc.snippet fetches the HTML tags.
    For example I get this, as a snippet result in one of my searches: Qual Germany n1 &lt;p&gt;Test Qual Germany n1&lt;/p&gt;
    I want the result to be fetched without the HTML tags.
    In my index configuration I have used NULL FILTER and HTML_SECTION_GROUP.With that configuration I managed to eliminate the HTML tags but not in all cases!
    For example:
    I search table CONTENTS columns TITLE(VARCHAR2) and MAIN_TEXT(CLOB)
    I created the following procedure that concatenates the two columns:
    CREATE OR REPLACE PROCEDURE CONTENTS_PROC( p_id in rowid, p_lob IN OUT clob)
    IS
    BEGIN
    FOR c1 IN (SELECT main_text||' '||title data FROM contents WHERE ROWID = p_id)
    LOOP
    dbms_lob.copy( p_lob, c1.data,
    dbms_lob.getlength( c1.data ));
    END LOOP;
    END;
    I created a user Datastore:
    BEGIN
    ctx_ddl.create_preference( 'content_trans_datastore', 'user_datastore' );
    ctx_ddl.set_attribute( 'content_trans_datastore', 'procedure', 'CONTENTS_PROC' );
    END;
    and finally I create the index:
    CREATE INDEX content_trans_ot_idx ON contents(ORACLE_TEXT_COLUMN)
    INDEXTYPE IS ctxsys.CONTEXT PARAMETERS ('datastore content_trans_datastore SYNC(ON COMMIT) STORAGE INDEX_STORAGE filter ctxsys.null_filter section group ctxsys.html_section_group');
    When I perform the search on those data: &lt;p&gt; &lt;strong&gt;Test Doc-Test &lt;/strong&gt; &lt;/p&gt; the snippet I get is: Test Doc-Test.
    That's fine, the html tags are removed!
    In another case I search table NCP columns NAME(VARCHAR2) and BODY(VARCHAR2)
    I created the following procedure that concatenates the two columns:
    CREATE OR REPLACE PROCEDURE NCP_PROC( p_id in rowid, p_lob IN OUT clob)
    IS
    BEGIN
    FOR c1 IN (SELECT name||' '||body data FROM ncp WHERE ROWID = p_id)
    LOOP
    dbms_lob.copy( p_lob, c1.data,
    dbms_lob.getlength( c1.data ));
    END LOOP;
    END;
    I created a user Datastore:
    BEGIN
    ctx_ddl.create_preference( 'ncp_trans_datastore', 'user_datastore' );
    ctx_ddl.set_attribute( 'ncp_trans_datastore', 'procedure', 'NCP_PROC' );
    END;
    and finally I create the index:
    CREATE INDEX ncp_trans_ot_idx ON ncp(ORACLE_TEXT_COLUMN)
    INDEXTYPE IS ctxsys.CONTEXT PARAMETERS('datastore ncp_trans_datastore SYNC(ON COMMIT) STORAGE INDEX_STORAGE filter ctxsys.null_filter section group ctxsys.html_section_group');
    When I perform the search on those data: test &lt;strong&gt; &lt;/strong&gt;http://deleteme.com the snippet I get is: test &lt;strong&gt; &lt;/strong&gt;http://deleteme.com!!!!!!!!!!
    How is this possible? Why in the first case the HTML tags are eliminated and in the second case they are not?
    Thanks,
    Margarita
    Edited by: user13312701 on 07-Sep-2010 08:51

    Doing various tests I found out that the problem is when I need to search in multiple columns of a table.
    That is when I create a user_datastore that uses a procedure that concatenates the columns.
    And especially when the data with the html tags is in a VARCHAR2 column.
    e.g
    --create the table*
    CREATE TABLE CONTENT_TRANS (content_trans_id NUMBER,
    main_text CLOB,
    title vARCHAR2(2000),
    oracle_text_column VARCHAR2(1));
    alter table "CONTENT_TRANS" add constraint CONTENT_PK primary key("CONTENT_TRANS_ID") ;
    --Insert dummy data*
    Insert into CONTENT_TRANS
    (CONTENT_TRANS_ID,MAIN_TEXT,TITLE)
    values
    (1,'lorem','lorem <p>qualification</p> 2.1 ');
    Insert into CONTENT_TRANS
    (CONTENT_TRANS_ID,MAIN_TEXT,TITLE)
    values
    (2,'lorem','lorem <br>qualification</br> 2.1 ');
    --CREATE THE procedure that concatenates main_text(CLOB) and title(VARCHAR2)*
    CREATE OR REPLACE PROCEDURE CONTENT_TRANS_PROC( p_id in rowid, p_lob IN OUT clob)
    IS
    BEGIN
    FOR c1 IN (SELECT main_text||' '||title data FROM content_trans WHERE ROWID = p_id)
    LOOP
    dbms_lob.copy( p_lob, c1.data,
    dbms_lob.getlength( c1.data ));
    END LOOP;
    END;
    --Create the user datastore*
    BEGIN
    ctx_ddl.create_preference( 'content_trans_datastore', 'user_datastore' );
    ctx_ddl.set_attribute( 'content_trans_datastore', 'procedure', 'CONTENT_TRANS_PROC' );
    END;
    --Create the index*
    CREATE INDEX content_trans_ot_idx ON content_trans(ORACLE_TEXT_COLUMN)
    INDEXTYPE IS ctxsys.CONTEXT PARAMETERS ('datastore content_trans_datastore SYNC(ON COMMIT) filter ctxsys.null_filter section group ctxsys.html_section_group');
    exec ctx_doc.set_key_type('PRIMARY_KEY');
    --Perform the query
    SELECT SCORE(1),ct.content_trans_id, ctx_doc.snippet('content_trans_ot_idx', ct.content_trans_id, 'lorem') as snippet
    from content_trans ct
    where contains(ct.ORACLE_TEXT_COLUMN, 'lorem', 1) > 1;
    Results WITH NOT WANTED HTML TAGS:
    6     1     <b>lorem</b> <b>lorem</b> &lt;p&gt;qualification&lt;/p&gt; 2.1
    6     2     <b>lorem</b> <b>lorem</b> &lt;br&gt;qualification&lt;/br&gt; 2.1
    Edited by: user13312701 on 13-Oct-2010 01:18

  • How to include HTML tags in a success message?

    I have seen a few posts on this topic in the past, but have not seen a definitive response...apologies if this has been answered.
    I would like to have a dynamic process success message that includes some HTML tags in it - in this case an anchor tag that can jump the user back to the object he/she just edited.
    So, I build up a dynamic success message in a page variable - say P10_SUCCESS_MSG - and set the Process Success Message field in the relevant Process to &P10_SUCCESS_MSG.
    The problem is that when the page template substitutes in my message for #SUCCESS_MESSAGE# it looks like it also escapes any HTML tags, so the markup gets displayed literally on the page.
    Is there any recommended way to override or get around this behavior?
    Many thanks,
    Bill

    I just noticed that it looks like the success message is passed around on the URL - when I look at my URL after a successful form process, I see &success_msg=BIG_UGLY_ESCAPED_SUCCESS_MSG_HERE embedded in the URL. If this is the case, I can see why - technically - it ends up getting escaped. Looks like I may have to figure out my own hack for success message processing - maybe some weird post-processing of a placeholder success token that I replace in a page 0 process or something...

Maybe you are looking for

  • My app store got deleted how do I get it back ?

    I need help getting my app store back my son deleted it and I have no clue how to get it back I need help please and thank you.

  • Re-install issue

    my gf totally deleted my ichat application. Any place ive tried to download it I get something about not being able to do it on this volume? Anyway is there a way i can reinstall it without the startup disk? Im using version 10.4.10 thanks

  • IPhoto to Aperture Events vs. Albums?

    I'm sorry if this is an obvious question, but I'm new to Aperture. I imported two rather substantial libraries from iPhoto into Aperture. I got all my folders and albums from iPhoto. I also got an Events folder for each library filled with Projects c

  • Quicktime playback bright and gray, compared to FCP or After Effects

    OK, this is so confusing, I have been working with Quicktime for years but I can't seem to resolve this issue: I bought a MacPro (Xeon) and for some reason all the clips I create in Final Cut Pro or After Effects don't play back correctly in Quicktim

  • SO654 - send mail medium '7' to a e-mail address from HR Minimaster direct

    I created an output type that has as a partner a number from the HR minimaster. Now the Minimaster does have a communication block 0105 setup but only the subtype '0010' and not '0001' as normally requested. Now I get the error message SO654 when try