Donate Share

JTidy

Code

Programming Languages: Java

License: Other License

Repositories

browse code, statistics, last commit on 2009-10-30 svn co https://jtidy.svn.sourceforge.net/svnroot/jtidy jtidy

Show:

What's happening?

  • Comment: Incorrect parsing of <td> attributes

    The W3C validator is not JTidy. Did you get those 2 errors from JTidy or not? Also which JTidy option (that you used) is supposed to replace the width and bgcolor attributes with inline style?.

    2009-11-08 01:39:21 UTC by aditsu

  • Comment: Incorrect parsing of <td> attributes

    If you try W3C validator at http://validator.w3.org/#validate_by_upload+with_options with file after.html (see attachment), you'll get errors connected with "width" and "bgcolor" attributes of tag. Short extract of error report you can find in file "ErrsByValidator.doc" (see attachment).

    2009-11-06 11:00:47 UTC by alexkainov

  • Comment: Incorrect parsing of <td> attributes

    "The code is quite simple" -> I totally disagree. Also note that you should attach a file instead of pasting the input in a comment, because it's too big, and because the formatting and encoding were most likely affected. Anyway, I used your code and your input, and I still did not get the errors you mentioned. It did preserve the width and bgcolor attributes in the td, but I'm not sure why...

    2009-11-06 10:14:24 UTC by aditsu

  • Comment: Incorrect parsing of <td> attributes

    OK :) Here is the input: cell 1

    2009-11-06 09:38:30 UTC by alexkainov

  • Comment: Incorrect parsing of <td> attributes

    Hi, I asked for the input, but you didn't provide it, you only explained how you obtained it. You're also using TOOOOOOOOOO many steps to convert the input before passing it to JTidy, but that shouldn't affect the processing of the td tag you showed. You don't need any .NET stuff. You can find Tidy at http://tidy.sourceforge.net/ and http://sourceforge.net/projects/tidy.

    2009-11-06 09:33:33 UTC by aditsu

  • Comment: Incorrect parsing of <td> attributes

    Hi ! Thanks for the answer ! Well, I use URL u.openStream() as input for the parser: URL u = new URL(url + doc.getUniversalID()); BufferedReader in = new BufferedReader( new InputStreamReader( u.openStream(),"UTF-8") ); String s; StringBuffer htmlStr = new StringBuffer(); while( (s = in.readLine()) != null){ htmlStr.append(s); } String htmlString = htmlStr.toString(); The code...

    2009-11-06 08:58:50 UTC by alexkainov

  • Comment: Should not discard valid elements due to inserted elements

    Ok, well, the behavior seems to match Tidy again. So.. sorry but I'll have to send you to the Tidy project, ask them to fix it.

    2009-11-06 06:53:08 UTC by aditsu

  • Comment: Should not discard valid elements due to inserted elements

    Sorry, it's 1-liner, so I didn't figure it was necessary. I'll post the code next time. This is very similar, but slightly different from the bug I posted earlier. new Tidy().parseDOM(new ByteArrayInputStream("jschmoe".getBytes()), System.out);.

    2009-11-06 06:12:22 UTC by chengas123

  • Comment: Incorrect parsing of <td> attributes

    I don't get those errors, maybe you haven't included the whole input (especially the doctype). You also haven't provided the code. Anyway, check if tidy (the C program) behaves differently.

    2009-11-06 02:32:54 UTC by aditsu

  • Comment: Should not discard valid elements due to inserted elements

    Again you did not provide the output nor the code. Also, wasn't this fixed by the patch you provided yourself for bug 2855511?.

    2009-11-06 02:26:46 UTC by aditsu

Our Numbers