[ZCM] [ZC] 2292/ 3 Comment "entity refs inside zope"

"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Mon, 19 Mar 2007 08:24:54 -0400
Newsgroups gmane.comp.web.zope.devel.collector-monitor
Message-ID <[email protected]>
Issue #2292 Update (Comment) "entity refs inside zope"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2292

==============================================================
= Comment - Entry #3 by fgsch on Mar 19, 2007 8:24 am

This is true but all the browsers seem to believe &something is valid (or at least do not try to add a semicolon at the end), so even if this is not the case, following the common behaviour would be better.
________________________________________
= Comment - Entry #2 by tseaver on Mar 19, 2007 8:20 am

ZPT generally requires well-formedness in the templates, although
the output may not be well-formed in cases where the 'structure'
modifier is used.  Your example is not Would you prefer that ZPT just mark that as an error?  

For instance, here is what 'tidy' says about a document including
your example::

 $ cat test.html
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html>
 <title>Test Zope Collector #2292</title>
 <body>
 <h1>Test Zope Collector #2292</h1>
 <div>&messageId</div>
 </body>
 </html>
 $ tidy -e test.html
 line 6 column 6 - Warning: unescaped & or unknown entity "&messageId"
 ...

________________________________________
= Request - Entry #1 by fgsch on Mar 19, 2007 7:44 am

This is really a bug in python, but I've been suggested to fill it here so Zope can workaround it. The text '<div>&messageId</div>' is wrongly rendered as '<div>&messageId;=</div>' in a Page Template as the HTMLParser module in python wrong matches '&something' as an entity reference.
I'll open a separate bug with Python, but it'd be nice if Zope can cope with this issue until is fixed. Thanks.

==============================================================