I get a special html code:
< ;p > ;This is < ;a href=" ;http://www.test.hu" ;> ;a test link< ;/a> ; and this is & ;nbsp;a sample text with special char: & ;#233;va < ;/p> ;
(There isn't space before ; char, but if I don't insert space the stackoverflow format it)
It's not a normally html code, but if I paste in a empty html page, the browser show it with normal tags:
<_p_>This is <_a_ href="http://www.test.hu">a test link<_/a_> and this is a sample text with special char: éva <_/p_>
This code will be shown in a browser:
This is a test link And this is a sample text with special char: éva
So I want to get this text, but I can't use Html.fromHtml
, because the component what I use doesn't support Spanned
. I wanted to try StringEscapeUtils
, but I couldn't import it.
How can I replace special chars and remove tags?
No comments:
Post a Comment