[ZCM] [ZC] 321/ 1 Request "Page Templates: handling ick from MS applications"

Collector: Zope Bugs and Patches ... zope-coders@zope.org
Thu, 28 Mar 2002 17:54:45 -0500


Issue #321 Update (Request) "Page Templates: handling ick from MS applications"
 Status Pending, Zope/bug+solution medium
To followup, visit:
  http://collector.zope.org/Zope/321

==============================================================
= Request - Entry #1 by chrisdeckard on Mar 28, 2002 5:54 pm


Uploaded:  "TAL_patches.diff"
 - http://collector.zope.org/Zope/321/TAL_patches.diff/view
We have set up a PUT_factory to create Page Templates 
out of files PUT through WebDAV with a content type 
of 'text/html'.  This works all fine and dandy until 
we run across bad HTML from MS Office XP applications 
(specifically PowerPoint XP).  The problems are in 
TAL/HTMLParser.py.

An example of badness:
<!--[if gte mso 9]>
or
<![endif]-->

This causes the Page Template renderer to break.  
I have a sample patch wich seems to work.  Some of 
the new stuff should probably be renamed as it 
slams MS.  :-)

Another error occurs due to a bug in TAL/markupbase.py.  
The call to error() when we have a bad declaration 
name to scan.  Two parameters were being passed to 
self.error and it only takes one (plus self).

Attached in a file are two patches which seem to fix 
the problems.  I'll also include the PUT_factory that
I'm using in case you want to test with it.  If you need
a sample PowerPoint XP file, let me know and I can put 
one up for you.

-Chris
==============================================================