7 Replies Latest reply: Feb 10, 2011 12:20 PM by fac586 RSS

    Stopping APEX from converting & to &amp

    Matt.Smith
      Its that simple, Its converting & to &amp in a select list. All I want is a space before the letter. I have tried everything I can think of. All other post I can find say to do the htf.escape and unistr but none produce a space. I have tried the following

      SELECT htf.escape_sc(' ') || 'A' D, RPT R from dual;
      SELECT htf.escape_sc('\00a0') || 'A' D, RPT R from dual;
      SELECT UNISTR(' ') || 'A' D, RPT R from dual;
      SELECT UNISTR('\00a0') || 'A' D, RPT R from dual;

      This worked great in 3.2, Trying to move this to 4.1.
        • 1. Re: Stopping APEX from converting & to &amp
          807466
          Hi,


          Have you tried
          SELECT chr(32) || 'A' D,
                 RPT R
          FROM dual
          OR
          SELECT ' A' D, --actually use the &nbsp
                 RPT R
          FROM dual
          Austin
          • 2. Re: Stopping APEX from converting & to &amp
            fac586
            Both the <tt>unistr</tt> and <tt>/* htf.escape_sc */</tt> comment methods discussed in +{thread:id=2126522}+ work for me on APEX 4.0.2.00.07. Suggest you replicate your problem on apex.oracle.com and post developer login credentials so someone can take a look.
            Trying to move this to 4.1
            Unless you're involved in a non-public beta programme, you're not: the latest production version is 4.0.2.

            (Please post code \...\wrapped in <tt>\
            ...\
            </tt> tags
            to prevent the character entities in your posts meeting the same fate at the hands of the forum software.)
            • 3. Re: Stopping APEX from converting & to &amp
              ATD
              Hi Matt,

              For a space, try using character 160 - the non-breaking space.

              To do that, either use CHR(160) or hold down the Alt key on your keyboard, type 160 on the number keypad and then release the Alt key

              Andy
              • 4. Re: Stopping APEX from converting & to &amp
                Matt.Smith
                Unless you're involved in a non-public beta programme, you're not: the latest production version is 4.0.2.
                Sorry, it is Ver 4.0.1.00.03
                Its our server. I can not reproduce this on the apex.oracle server. Have tried it with select lists, text box, and Shuttles. Also created a PL/SQL region and had it just select &amp;nbsp; from dual and htp.print it, still replaced it... All are replacing the & with amp;.... And with the \00a0, ALT-0160, and all other suggestions, in the sorce code it shows the space, but its not being rendered.

                If any one knows of a setting on the back end that might be doing this, please let me know....

                Thanks for the help so far.

                Edited by: Matt.Smith on Feb 10, 2011 7:38 AM
                • 5. Re: Stopping APEX from converting & to &amp
                  ATD
                  Hi,

                  I've just tried a list with chr(160) and it outputs the spaces correctly: http://apex.oracle.com/pls/apex/f?p=33642:309

                  Andy
                  • 6. Re: Stopping APEX from converting & to &amp
                    807466
                    Hi,

                    You need to upgrade your version to 4.0.2.00.07

                    The patch notes for that version are here: http://www.oracle.com/technetwork/developer-tools/apex/application-express/402-patch-189110.html#CHDCHDEE

                    Notice Item 10158459
                    It deals specifically with your issue.

                    Austin
                    • 7. Re: Stopping APEX from converting & to &amp
                      fac586
                      Sorry, it is Ver 4.0.1.00.03
                      Tried the <tt>unistr</tt> and <tt>/* htf.escape_sc */</tt> comment methods on APEX 4.0.1.00.03 successfully.

                      Would still suggest that even if you can't replicate your problem on apex.oracle.com that you replicate your code there and post developer login credentials so we can see exactly what you're doing.