-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
t.w.template does not always properly escape comments #5275
Comments
I couldn't think of an elegant way to fix this without changing the way comments are serialized sometimes. Not sure anyone cares. Also, the proposed patch escapes things which strictly need not be escaped, at least by SGML syntax rules. My reasoning was that it's better to be conservative and generate something that won't confuse a browser's parser and will be recognized as a comment than it is to follow SGML to the letter. There are plenty of valid SGML comments that confuse browsers anyway, so this seems reasonable. |
Seriously, comment syntax is complicated. Did you know they can't end in '-'? I didn't. http://www.w3.org/TR/REC-xml/#sec-comments |
(In [32674]) Branching to 'template-comment-fix-5275' |
Thanks a lot! Some simple coding standard points:
Some others:
These points are pretty minor. I'll address them and merge, if everything looks good on buildbot. |
(In [32678]) Merge template-comment-fix-5275 Author: indigo Add comment value mangling to |
Which of course is malformed HTML, because HTML is SGML, and comments in SGML begin and end with '--', and are between '<!' and '>'. Or something like that.
What this generates is a comment declaration with one comment, 'the quick- ', and some illegal characters 'brown fox--'.
http://htmlhelp.com/reference/wilbur/misc/comment.html
Attachments:
Searchable metadata
The text was updated successfully, but these errors were encountered: