This discussion is archived
12 Replies Latest reply: Feb 25, 2007 12:42 PM by Arie Geller RSS

strange things happening: broken html in output

417474 Newbie
Currently Being Moderated
Hi

One of my clients has a problem with sporadically appearing broken html in their ApEx application. They have version 2.2 of ApEx. Sometimes just a few symbols are missing, though most of the source is ok. It appears and disappears without any reason known, but once it happens on a page, it will be there for some time (reproducible for some days), but finally disappears again. The appearing/disappearing might be from editing the application - they are currently programming their application. At first I thought they had altered their Page Template in some way (they use default ApEx Theme 2 that is practically unmodified - only javascript file include and some custom classes added) and demanded to see it - but it was ok. And then I saw it doesn't happen only in the Page Template part (they sent me example of how the end - </html> tag - had been stripped short into </ht, so the first thought was modified Page Template), but also in tables (on one page they showed me a report, which had </td><td> missing from the middle of table and also part of the text, that should have been displayed in the following column); in one report all but one edit icon displayed correctly.

Have you seen anything like this before? Where should I look next?
Just in case, I asked their code pages, because they might help to answer:
Application express UTF-8
Database WEISO8859P15

Thanks in advance,
Kaja
  • 1. Re: strange things happening: broken html in output
    Chet Justice Oracle ACE
    Currently Being Moderated
    Kaja,

    Are they by chance displaying text from a database column there?

    I have had the same issue when displaying text entered into a text area form by end users. One (or more) of the characters they entered "broke" the html.

    chet
  • 2. Re: strange things happening: broken html in output
    417474 Newbie
    Currently Being Moderated
    Hi,

    In the broken report table case they do indeed display data from column - but I verified, that this is pure textual value, no html in it, no special symbols like &lt; or &gt; (might be some estonian ä, ö, ü or õ, but I don't believe it could be a problem). But the bad data could only be reason for the report cases, it couldn't be the reason why a few symbols are missing from the end of the html document (the broken </html> and </body> tags). In that case the whole end of the html document is missing. For example on some pages the </body> tag is broken into &lt;/bo and then there is no </html> tag in the end, too.

    Kaja
  • 3. Re: strange things happening: broken html in output
    537859 Newbie
    Currently Being Moderated
    HI Kaja,

    i have the same problems with my select list. Everything works fine for 2 or 3 weeks but
    now the html code is broken. Sometimes Apex forget to close the tags or in the tags are missing
    spells. Does anyone knows what is wrong or what can i do ???

    thx
    Phil
  • 4. Re: strange things happening: broken html in output
    Denes Kubicek Oracle ACE Director
    Currently Being Moderated
    I have seen a similar problem:

    CREATE OR REPLACE FUNCTION out_string_fn
       RETURN VARCHAR2
    IS
       CURSOR emp_cur
       IS
          SELECT ename
            FROM emp;

       v_string   VARCHAR2 (4000);
    BEGIN
       FOR c IN emp_cur
       LOOP
          v_string :=
                v_string
             || '&lt;span style="font-weight:bold;color:green">'
             || c.ename
             || '&lt;/span>'
             || ', &lt;/br>&lt;/br>';
       END LOOP;

       v_string := LTRIM (v_string, ', ');
       v_string := LTRIM (v_string, '&lt;/br>&lt;/br>');
       v_string := RTRIM (v_string, '&lt;/br>&lt;/br>');
       v_string := RTRIM (v_string, ', ');
       RETURN v_string;
    END;
    Running a query:

    SELECT out_string_fn
      FROM DUAL
    returns the following
      span style="font-weight:bold;color:green">KING&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">BLAKE&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">CLARK&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">JONES&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">SCOTT&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">FORD&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">SMITH&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">WARD&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">MARTIN&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">TURNER&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">JAMES&lt;/span>, &lt;/br>&lt;/br>
    &lt;span style="font-weight:bold;color:green">MILLER&lt;/span>
    Denes Kubicek
  • 5. Re: strange things happening: broken html in output
    537859 Newbie
    Currently Being Moderated
    my problem looks like that:

    source:

    <option selected="selected" value="argentinisch">argentinisch</option>
    <option value="brasilianisch">brasilianisch</option>
    <option value="chinesisch">chinesisch</option>
    <option value="dänisch">dänisch</option>
    <option value="deutsch">deutsch</option>
    <option value="deutsch, Österreich">deutsch, Österreich</option>
    <option value="deutsch, Schweiz">deutsch, Schweiz</option>
    <ption value="englisch">englisch</option>
    <option value="englisch, Ägypten">englisch, Ägypten</option>
    <option value="englisch, Australien">englisch, Australien</option>
    <option value="englisch, Großbrtannien">englisch, Großbrtannien</option>
    <optin value="englisch, Indien">englisch, Indien</option>
    <option value="englisch, Kanada">englisch, Kanada</option>
    <option value="englisch, Neuseeland">englisch, Neuseeland</option>
    <option value="englisch, Singapur">englisch, Singapur</option>
    <option value="englisch, Südafrika">englisch, Südafrika</option>
    <option value="englisch, USA">englisch, USA</option>
    <option value="estnisch">estnisch</option>
    <option value="finnisch">finnisch</option>
    <option value="französisch">französisch</option>
    <option value="französisch, Belgien">französisch, Belgien</option>
    <option value="französisch, Luxemburg">französisch, Luxemburg</option>
    <option value="griechisch">griechisch</option>
    <option value="italienisch">italienisch</option>
    <option valu="kroatisch">kroatisch</option>
    <option value="lettisch">lettisch</option>
    <option value="litauisch">litauisch</option>
    <option value="niederländisch">niederländisch</option>
    <option value="niederländisch, Belgien">niederländisch, Belgien</option>
    <option value="niederländisch, Luxemburg">niederländisch, Luxemburg</option>
    <option value="norwegisch">norwegisch</option>
    <option value="polnisch">polnisch</option>
    <option value="portugiesisch">portugiesisch</option>
    <option value="rumänisch">rumänisch</option>
    <option value="russisch">russisch</option>
    <option value="schwedisch">schwedisch</option>
    <option value="slowakisch">slowakisch</option>
    <option value="slowenisch">slowenisch</option>
    <option value="spanisch">spanisch</option>
    <option value="spanisch, Mexiko">spanisch, Mexiko</option>
    <option value="Süd-Korea">Süd-Korea</option>
    <option value="tschechisch">tschechisch</option>
    <option value="türkisch">türkisch</option>
    <option value="ungarisch">ungarisch</option>
    </selec>

    Does anybody know whether the new patch fix this problem ?? or have you already installed the patch ?? What can i do ??

    thx Phil
  • 6. Re: strange things happening: broken html in output
    Chet Justice Oracle ACE
    Currently Being Moderated
    You should do a view source and paste that into an HTML editor (I use JDev). That will highlight any possible problems.

    One thing that I have done is to pass the text entered into a textarea box and strip any "weird" characters. Users have a habit of cutting and pasting from Word. Here's a snippet from my strip_weird_characters function:
        l_text := REPLACE( p_text, CHR( 133 ), '...' );  --ELLIPSIS
        l_text := REPLACE( l_text, CHR( 147 ), '"' ); --DOUBLE QUOTE
        l_text := REPLACE( l_text, CHR( 148 ), '"' ); --DOUBLE QUOTE
    chet
  • 7. Re: strange things happening: broken html in output
    554212 Newbie
    Currently Being Moderated
    you must have properly defined NLS parameters
  • 8. Re: strange things happening: broken html in output
    554212 Newbie
    Currently Being Moderated
    sorry, I was wrong
    you must have properly defined (oracle embeded) webserver code page/encoding
  • 9. Re: strange things happening: broken html in output
    135285 Oracle ACE
    Currently Being Moderated
    Anybody found a solution for that?

    Because a user of my ApexLib Framework who is located in Norway has the same problem! And I have no real clue what to do.

    Depending on the data which are displayed, some of the HTML code/JavaScript code which is below is destroyed.

    Thanks
    Patrick
  • 10. Re: strange things happening: broken html in output
    Arie Geller Guru
    Currently Being Moderated
    Hello Patrick,

    Problems with HTML output are typical to DB without the PL/SQL Web Toolkit patch. I would check it first.

    Also, make sure they are using AL32UTF8 in the DAD.

    Regards,
    Arie.
  • 11. Re: strange things happening: broken html in output
    135285 Oracle ACE
    Currently Being Moderated
    Thanks Arie!

    I also thought about something similar and just got the confirmation that after applying the patch everything works fine!

    Thanks
    Patrick
  • 12. Re: strange things happening: broken html in output
    Arie Geller Guru
    Currently Being Moderated
    Hello Patrick,

    I'm glad to hear everything is working well now.

    It seems that this patch issue is not emphasized enough. One paragraph in the release notes – that most users tends to skip – seems not to do the work. Well, it will probably be solved with Oracle 11g :)

    Regards,
    Arie.