Input:
// Test with TITLE in HEAD
String input = "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n"
+ " <head>\n"
+ " <title>Title test</title>\n"
+ " </head>\n"
+ " <body>\n"
+ " <p>before</p>\n"
+ " <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"300\" width=\"500\">\n"
+ " <g>\n"
+ " <title>SVG Title Demo example</title>\n"
+ " <rect height=\"50\" style=\"fill:none; stroke:blue; stroke-width:1px\" width=\"200\" x=\"10\" "
+ "y=\"10\"></rect>\n"
+ " </g>\n"
+ " </svg>\n"
+ " <p>after</p>\n";
Assert.assertEquals(HEADER + input + FOOTER, HTMLUtils.toString(this.cleaner.clean(new StringReader(input))));
Results in:
https://www.evernote.com/shard/s119/sh/7876478a-42d2-421d-9780-b53ea7c88660/9a60e113784cc72a16f560ef2d5a0f84
Fixed in 2.9; this related to recognising variations of the XHTML XMLNS, including incorrect ones.
Thanks a lot Scott! :)