问题
I am trying set 1®2 in outputText:
<h:outputText value="1<sup>®<sup/>2" escape="false"/>
What is incorrect? I get 2
in uppercase.
回答1:
You can choose one of the following
In your original proposal you had a misplace the /
it should be before the sup
<h:outputText value="1<sup>®</sup>2" escape="false"/>
You can also remove the sup
completely (but than your (R) wont be small)
<h:outputText value="1®2" escape="false"/>
Finally you can use it directly without escaping
<h:outputText value="1®2"/>
来源:https://stackoverflow.com/questions/14374758/jsf-houtputtext-escape-special-chars