r13437 - Products.PortalTransforms/branches/1.6/Products/PortalTransforms/transforms
"Michael Smith" <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: msmith64
Date: Fri Jan 28 01:25:44 2011
New Revision: 13437
Modified:
Products.PortalTransforms/branches/1.6/Products/PortalTransforms/transforms/safe_html.py (contents, props changed)
Log:
Merged fix originally committed to core http://dev.plone.org/archetypes/changeset/11965.
'area' element is empty in xhtml (wasn't in html), so preserve trailing slash in tag. Fixes #9122.
Modified: Products.PortalTransforms/branches/1.6/Products/PortalTransforms/transforms/safe_html.py
==============================================================================
--- Products.PortalTransforms/branches/1.6/Products/PortalTransforms/transforms/safe_html.py (original)
+++ Products.PortalTransforms/branches/1.6/Products/PortalTransforms/transforms/safe_html.py Fri Jan 28 01:25:44 2011
@@ -21,7 +21,7 @@
VALID_TAGS['del'] = 1
VALID_TAGS['q'] = 1
VALID_TAGS['map'] = 1
-VALID_TAGS['area'] = 1
+VALID_TAGS['area'] = 0
VALID_TAGS['abbr'] = 1
VALID_TAGS['acronym'] = 1
VALID_TAGS['var'] = 1
@@ -161,7 +161,7 @@
if safeToInt(self.valid.get(tag)):
self.result.append('</%s>' % tag)
#remTag = '</%s>' % tag
-
+
def parse_declaration(self, i):
"""Fix handling of CDATA sections. Code borrowed from BeautifulSoup.
"""
@@ -181,7 +181,7 @@
self.result.append(toHandle)
j = i + len(toHandle)
return j
-
+
def getResult(self):
return ''.join(self.result)
@@ -199,13 +199,13 @@
class SafeHTML:
"""Simple transform which uses CMFDefault functions to
- clean potentially bad tags.
+ clean potentially bad tags.
Tags must explicit be allowed in valid_tags to pass. Only
the tags themself are removed, not their contents. If tags
are removed and in nasty_tags, they are removed with
- all of their contents.
-
+ all of their contents.
+
Objects will not be transformed again with changed settings.
You need to clear the cache by e.g.
1.) restarting your zope or
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d