Using JTidy with some HTMLs that have attributes with value without quotes (") I gave an error because the separator space for attributes was deleted.
Example:
Original: <A NAME="JD_CdigoTributarioArt.6RESOLUCIONN55">
After JTidy:
In this case, JTidy added a 'name' attribute with the same value of the 'id' attribute but without separator spaces for attributes.
The options used for this case are:
Tidy tidy = new Tidy();
tidy.setXmlOut(true);
tidy.setXHTML(true);
tidy.setPrintBodyOnly(true);
tidy.setShowWarnings(false);
tidy.setQuiet(true);
tidy.setNumEntities(true);
tidy.setDropProprietaryAttributes(true);
tidy.setLiteralAttribs(true);
I solve this using the option:
tidy.setIndentAttributes(true);
I attach the original htm of the example.
Sorry for my english and for guest user post
HTM of the example
I tried your input and your code, and the output I get is:
As you can see, the name attribute is on a separate line.
What version of JTidy are you using?
Hi
I think that you has tested it with setIndentAttributes(true). Try it WITHOUT this option. I solved my problem with this option. Without setIndentAttributes(true) you can see my error.
No, I used your exact code, without setIndentAttributes.
And you haven't answered my question.
You're right, I'm sorry.
Now, I'm using jtidy-r938.jar. I will test it much more
Thanks for your answer.