Java 在资源包中使用html标记
我尝试从包含html标记的资源包中放入一条消息,如:Java 在资源包中使用html标记,java,Java,我尝试从包含html标记的资源包中放入一条消息,如: application.portal.action.help=test <a href\="https://google.ro" target\="_blank">the opt in conditions</a> application.portal.action.help=test 在jsf输出标签中: <h:outputLabel id="test" value="#{myupmessages['app
application.portal.action.help=test <a href\="https://google.ro" target\="_blank">the opt in conditions</a>
application.portal.action.help=test
在jsf输出标签中:
<h:outputLabel id="test" value="#{myupmessages['application.portal.action.help']}"></h:outputLabel>
嗯…文本被呈现为呈现链接的纯文本iso
你有什么想法吗?为什么
谢谢。找到了解决方案:
我确实需要补充:
escape="false"
对于outputLabel控件:)属性可用于包含翻译,但将非纯文本的内容放入其中是一个非常糟糕的主意。