public virtual void EscapesGtInXmlAttributesButNotInHtml() { // https://github.com/jhy/jsoup/issues/528 - < is OK in HTML attribute values, but not in XML String docHtml = "<a title='<p>One</p>'>One</a>"; Document doc = iText.StyledXmlParser.Jsoup.Jsoup.Parse(docHtml); iText.StyledXmlParser.Jsoup.Nodes.Element element = doc.Select("a").First(); doc.OutputSettings().EscapeMode(Entities.EscapeMode.@base); NUnit.Framework.Assert.AreEqual("<a title=\"<p>One</p>\">One</a>", element.OuterHtml()); doc.OutputSettings().EscapeMode(Entities.EscapeMode.xhtml); NUnit.Framework.Assert.AreEqual("<a title=\"<p>One</p>\">One</a>", element.OuterHtml()); }