小编Kun*_*_89的帖子

目测无法识别html

我有将 html 作为字符串值返回的方法。我认为在显示时它会在浏览器上以粗体显示字符串,但它向我显示的字符串与浏览器上的一样。

public String getHtml() {
        return "<b>kunal</b>";
    }

<sly data-sly-use.item="demo.html.DemoHtml">
    ${item.html}
</sly>
Run Code Online (Sandbox Code Playgroud)

输出:

<b>kunal</b>
Run Code Online (Sandbox Code Playgroud)

有什么解决方法吗?

aem sightly

3
推荐指数
1
解决办法
1160
查看次数

标签 统计

aem ×1

sightly ×1