[Zope] Page Templates

Dieter Maurer dieter@handshake.de
Fri, 13 Dec 2002 22:11:47 +0100


Nuno Maltez writes:
 > We're building a site using ZPT and we're facing a problem.
 > 
 > The pages are in Portuguese, and therefore we have text in some
 > attributes with character entities like for instance
 > 
 > <img src="" alt="&aacute;gua">
 > 
 > This seems to be the correct HTML:
 > 
 > http://www.w3.org/TR/html401/charset.html#encodings
 > 
 > These tags don't have tal: attributes, however Zope always converts
 > the character entity's ampersand into &alt;, rendering the above
 > example as
 > 
 > <img src="" alt="&amp;aacute;gua">
 > 
 > which is nonsense. Is there anyway to prevent this?
 > We're using Zope 2.5.1
Please file a bug report to "<http://collector.zope.org/Zope>".

As a workaround (hack!), you might add entities relevant for
you to "TAL.HTMLParser.HTMLParser.unescape".
This will only work for character entities with a character code
in your charset.


Dieter