【问题标题】:using html tags in resource bundle在资源包中使用 html 标签
【发布时间】:2010-08-27 13:29:23
【问题描述】:

我尝试从包含 html 标签的资源包中放入一条消息,例如:

application.portal.action.help=test <a href\="https://google.ro" target\="_blank">the opt in conditions</a>

在一个 jsf 输出标签中:

<h:outputLabel id="test" value="#{myupmessages['application.portal.action.help']}"></h:outputLabel>

嗯...文本呈现为呈现链接的纯文本 iso。

你有什么想法……为什么?

谢谢。

【问题讨论】:

  • 属性可用于包含翻译,但在其中放入非纯文本内容是一个非常糟糕的主意。

标签: java


【解决方案1】:

找到解决方案:

我确实需要补充:

escape="false"

到 outputLabel 控件:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-12-09
    • 2016-04-09
    • 2021-05-31
    • 1970-01-01
    • 1970-01-01
    • 2015-06-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多