[Zope-CMF] Making HTML 'safe'.

Yuppie schubbe@web.de
Thu, 09 Jan 2003 21:53:09 +0100


Hi Chris!


Thanks for the feedback.

Chris Withers wrote:
> Yuppie wrote:
> 
>> <http://collector.zope.org/CMF/108>: CMFDefault.utils.strippingParser
>> ---------------------------------------------------------------------
>>
>> PROBLEM:
>> When having tags like <br /> or <img src="" /> the trailing slash is 
>> stripped.
>>
>> PROPOSED SOLUTION:
>> Use the patch attached to the bug report. This gives the values 1 and 
>> 0 a new meaning. Parser will always add a trailing slash to tags like 
>> <br> and <img src="">.
>>
>> QUESTION:
>> Any better ideas?
> 
> 
> You could look at Strip-O-Gram 
> (http://www.zope.org/Members/chrisw/StripOGram/) which was designed for 
> solving this exact problem and is qutie mature now, it's been around 
> since pre-PTK times.

What do you propose?
Strip-O-Gram also strips off trailing slashs. Right?

I don't think using a patched version of sgmllib is acceptable for CMF. 
What did you change in SGMLParser? Are these changes essential for 
html2safehtml?

Cheers,

Yuppie