You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何让Material APEX Card中的HTML代码正常渲染而非显示为文本?

Fixing HTML Rendering in Material APEX Card Classic Report

Got it, let's tackle this issue—your HTML in the content column is showing up as plain text because APEX automatically escapes special characters by default (a security measure to block XSS attacks). Here's how to fix it step by step:

Step 1: Disable HTML Escaping for the Content Column

APEX classic reports escape all HTML output by default, so we need to turn that off specifically for your content column:

  • Navigate to your classic report region's edit page.
  • Switch to the Columns tab.
  • Locate the content column and click the edit (pencil) icon next to it.
  • Scroll down to the Security section, then set Escape Special Characters to No.
  • Save your changes and run the page—your HTML should now render as intended.

Step 2: Clean Up Your SQL Query

Right now, you’re using &lt; and &gt; (HTML entities) instead of actual < and > tags. Even with escaping disabled, these entities will display as plain text symbols. Update your SQL to use raw HTML tags:

select '#APP_IMAGES#counter.png' img_src,
       'Counter' title,
       'This element is conformated by 3 sections: <ul><li>Prueba</li><li>Second Section</li><li>Third Section</li></ul>' content,
       ' ' btn_label_1,
       ' ' btn_label_2
from dual

Important Security Note

Disabling HTML escaping means untrusted content in the content column could introduce XSS risks. Make sure the content is either static (like your example) or properly sanitized if it includes user-generated input.

内容的提问来源于stack exchange,提问作者Mauricio Andrés

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:10:50