Scott Wilson
-
2019-09-04
- Group: v 2.7 --> v2.24
The following cleanup in HtmlCleaner:
if (ns.equals("https://www.w3.org/1999/xhtml") || ns.equals("http://w3.org/1999/xhtml")){
ns = "http://www.w3.org/1999/xhtml";
Map<String, String> attributes = startTagToken.getAttributes();
attributes.put("xmlns", "http://www.w3.org/1999/xhtml");
startTagToken.setAttributes(attributes);
}
Should be replaced by:
if (ns.endsWith("//www.w3.org/1999/xhtml") || ns.endsWith("//w3.org/1999/xhtml")){
ns = "http://www.w3.org/1999/xhtml";
Map<String, String> attributes = startTagToken.getAttributes();
attributes.put("xmlns", ns);
startTagToken.setAttributes(attributes);
}
In order to: