java - Revert decoded html string back to encoded string wihout losing tags -


i wanna convert decoded html charsequence normal form. can't find way it. in example, after converting back, got "text" in both variable b , c. should include bold tag.

charsequence = html.fromhtml("<b>text</b>"); string b = html.escapehtml(a); // b "text", cannot convert "<b>text</b>" string c = textutils.htmlencode(a); // same b 

by way, need use charsequence decoded html. no string. encoded html, type ok.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -