Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Render HTML string retrieved from SQL

DannyS-OracleJun 24 2016 — edited Jun 25 2016

Hi guys, hope you can help me solve this rendering problem.

Basically I am trying to copy from the sample Group Calendar application in Apex 5. In the calendar below, the legend was printed with respective color successfully using HTML.

Screen Shot 2016-06-24 at 6.52.08 PM.png

But when I tried to do the same thing, the legend ended up printed as normal string instead of HTML:

Screen Shot 2016-06-24 at 6.55.09 PM.png

Please let me know how I can tell APEX to render the string as HTML... I generated the legend by using this SQL (practically imitating from the Apex's Group Calendar sample application):

select

   case when events.Color\_Code is not null

        then '\<span style="color:' || apex\_escape.html(events.Color\_Code) || 

             '; white-space:nowrap; font-weight:bold;">' || 

             apex\_escape.html(events.Name) || '\</span>'

        else '\<span style="white-space:nowrap; font-weight:bold;">' ||

             apex\_escape.html(events.Name) || '\</span>'

        end legend

from EVENTS events

order by upper(loc.Name)

This post has been answered by DannyS-Oracle on Jun 24 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2016
Added on Jun 24 2016
5 comments
1,759 views