This content has been marked as final.
Show 2 replies
-
1. Re: How to convert the HTML into text
mail.micke Dec 9, 2008 10:31 AM (in response to huhaihong)Hi
Do you want to remove all html elements from the text?
Or do you want want the text to not be escaped?
If you want to remove all html tags all you need is some regular expression magic, or use a html parsing library (I'd go for regexp).
If you just don't want the html to be escaped do this:
<h:outputText value="#{email.body}" escape="false"/>
Cheers,
micke -
2. Re: How to convert the HTML into text
huhaihong Dec 10, 2008 8:45 AM (in response to huhaihong)
Mikael Andersson wrote on Dec 09, 2008 10:31:
Hi
Do you want to remove all html elements from the text?
Or do you want want the text to not be escaped?
If you want to remove all html tags all you need is some regular expression magic, or use a html parsing library (I'd go for regexp).
If you just don't want the html to be escaped do this:<h:outputText value="#{email.body}" escape="false"/>
Cheers,
mickeThanks for your reply. I want to remove all html tag, however I also want the text between
p
tag can display on a new line.