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.

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

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)