I have the following code:
<h:outputText value="#{bean.shortDescription}" escape="false" />
The result is:
<p><b>Location. </b> <br /> a
The string from #{bean.shortDescription}
is being taken from an XML response that is escaped:
<p><b>Location. </b> <br /> a
If I make the same output text as above, but instead of taking the response from the XML, I just put the escaped string that comes from the response, e.g.:
<h:outputText value="<p><b>Location. </b> <br /> a" escape="false" />
Then the result is:
Location.
a
How can I properly render the HTML tags I get from the XML? I do not want to escape them.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…