Prevent JSOUP from unencoding attribute values
I have some code like this
String str = "<element data=\"some <data>\"> >foo< </element>"; Document doc = Jsoup.parse(str, "", Parser.xmlParser()); But JSOUP decrypts the meaning of the data , creating something like this
<element value="some <data>"> >foo< </element> How to prevent JSOUP from unencoding attribute values?
You are facing the well-known Jsoup problem (1.8.3 at the time of this writing).
See here for more details: https://github.com/jhy/jsoup/issues/55
The question was published on December 27, 2010 ... almost 5 years before your question. I hope this helps draw attention to this.
UPDATE
The author of Jsoup closed the problem, as it DOES NOT CORRECT.