renyard / validity

A Google Chrome extension for validating HTML.
https://chrome.google.com/webstore/detail/bbicmjjbohdfglopkidebfccilipgeif
Apache License 2.0
90 stars 22 forks source link

SyntaxError when W3C response contains a newline. #12

Closed MathieuTurcotte closed 13 years ago

MathieuTurcotte commented 13 years ago

A SyntaxError is generated in _logMessages when a W3C response contains an end-of-line character.

This situation occurs when an ill-formed attribute tag contains an end-of-line character.

Error in event handler for 'undefined': SyntaxError: Unexpected token ILLEGAL at _logMessages (chrome-extension://bbicmjjbohdfglopkidebfccilipgeif/validity.js:95:8) at chrome-extension://bbicmjjbohdfglopkidebfccilipgeif/validity.js:108:6 at [object Object].dispatch (chrome/EventBindings:181:28) at chrome/RendererExtensionBindings:91:24 at [object Object].dispatch (chrome/EventBindings:181:28) at Object. (chrome/RendererExtensionBindings:141:22)

renyard commented 13 years ago

Thanks, but can you provide an example of a page where I can reproduce this bug? Once I've tested this myself, I'll merge and get it into the next release.

MathieuTurcotte commented 13 years ago

http://mathieuturcotte.ca/textes/events-wait-for-multiple/

renyard commented 13 years ago

Great, thanks for the fix. I'll get it into 1.2.2 which I'm aiming to release in the next few days.

renyard commented 13 years ago

I'm no longer able to reproduce this, have you removed the error from your page that caused this issue? I've yet to confirm that the bug is in Validity, rather than Chrome or the W3C validator. Do you remember what caused the ill formed attribute in the W3C response?

MathieuTurcotte commented 13 years ago

I modified my webpage. Try this: http://mathieuturcotte.ca/newline-in-href.html

<!doctype html>

Newline in href tag.

2011/9/20 Ian Renyard < reply@reply.github.com>

I'm no longer able to reproduce this, have you removed the error from your page that caused this issue? I've yet to confirm that the bug is in Validity, rather than Chrome or the W3C validator. Do you remember what caused the ill formed attribute in the W3C response?

Reply to this email directly or view it on GitHub: https://github.com/renyard/validity/pull/12#issuecomment-2144575