[Zope-CMF] <u> not allowed in CMF Documents

Tres Seaver tseaver@zope.com
19 Dec 2002 00:46:12 -0500


On Wed, 2002-12-18 at 18:20, Dieter Maurer wrote:
> Tom Cameron writes:
>  > I've just finished building a CMF based site for a client and they have
>  > asked me why the <u> tag keeps disappearing from their documents.
>  > 
>  > I tested it out and sure enough it just keeps vanishing. Then after some
>  > hunting found a method in /CMFDefault/utils.py that defines VALID_TAGS and
>  > guess what - <u> is not one of them.
>  > 
>  > How can this be? has nobody every needed this tag? is there a simple
>  > solution that does not involve modifying the source code?
> I would not expect this...
> 
> However, you may file a "feature request with patch" to
> <http://collector.zope.org>. If you are lucky, later versions
> of CMF will contain your patch.

That kind of oversight is the downfall of a "whitelist" approach to
allowing tags.  I have corrected it on both the 1.3 branch and the
HEAD in CVS, with the following patch (against CMF-1_3-branch):

$ cvs diff CMFDefault/utils.py
Index: CMFDefault/utils.py
===================================================================
RCS file: /cvs-repository/CMF/CMFDefault/utils.py,v
retrieving revision 1.12.6.2
diff -u -r1.12.6.2 utils.py
--- CMFDefault/utils.py	21 Jul 2002 23:52:13 -0000	1.12.6.2
+++ CMFDefault/utils.py	19 Dec 2002 05:33:27 -0000
@@ -270,6 +270,7 @@
              , 'title'      : 1
              , 'tr'         : 1
              , 'tt'         : 1
+             , 'u'          : 1
              , 'ul'         : 1
              }
 

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com