I am parsing an html string with Jsoup in order to extract just the text, and want to get the exact text, but when I parse strings that include escaped chars Jsoup unescapes them. For example - if I parse
<p>Let's try</p>
Jsoup returns
<p>Let's try</p>
I searched extensively for a solution and tried using the doc.outputSettings
with different options of charset
and escapeMode
, but couldn't get Jsoup to not escape the html special chars