[Zope-CMF] Making HTML 'safe'.

Chris Withers chrisw@nipltd.com
Thu, 09 Jan 2003 18:04:17 +0000


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.

cheers,

Chris