Good morning all.
Is there any jsf control that escapes the html tags?
Imagine that i have the following string in resources:
text.String=lalala<br/>lelele
and i want to print it on Xhtml file with a simple control like:
<h:outputText value="#{messages['text.String']}" />
how do i get the result formatted with the html <br/>
tag?
Result should be:
lalala
lelele
instead of: lalala<br/>lelele
Thanks
the outputText control has an 'escape' property which controls that behaviour. See here (outputText reference).
So basically:
<h:outputText escape="false" value="#{messages['text.String']}" />
should do the job.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With