From: SourceForge.net <no...@so...> - 2010-04-17 19:17:23
|
Bugs item #2984038, was opened at 2010-04-09 01:56 Message generated for change (Settings changed) made by aditsu You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=2984038&group_id=13153 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Works For Me Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Adrian Sandor (aditsu) Summary: Posible issue with attributes manipulation Initial Comment: 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: <a id="JD_CdigoTributarioArt.6RESOLUCIONN55"name='JD_CdigoTributarioArt.6RESOLUCIONN55'></a> 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 ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2010-04-12 22:05 Message: You're right, I'm sorry. Now, I'm using jtidy-r938.jar. I will test it much more Thanks for your answer. ---------------------------------------------------------------------- Comment By: Adrian Sandor (aditsu) Date: 2010-04-12 21:46 Message: No, I used your exact code, without setIndentAttributes. And you haven't answered my question. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2010-04-12 21:43 Message: 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. ---------------------------------------------------------------------- Comment By: Adrian Sandor (aditsu) Date: 2010-04-11 21:14 Message: I tried your input and your code, and the output I get is: <a id="JD_CdigoTributarioArt.6RESOLUCIONN55" name='JD_CdigoTributarioArt.6RESOLUCIONN55'></a> As you can see, the name attribute is on a separate line. What version of JTidy are you using? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=2984038&group_id=13153 |