jtidy
jtidy copied to clipboard
Escaping of "<" characters into "<"
Dear all, this is more a question than an issue... I have an application where users can enter HTML source code for formatting. Somtimes it happens that users enter a less-than character ("<") instead of the entity "<" which leads to a damaged DOM and hidden content in some browsers. Is there a way to deal with such characters in JTidy? Currently I´m using JTidy with the following settings:
Tidy tidy = new Tidy();
tidy.setPrintBodyOnly(true);
tidy.setRawOut(true);
tidy.setWraplen(0);
tidy.setOutputEncoding("UTF-8");
tidy.setQuiet(true);
Thank you and best regards, Christof