[Product-Developers] stripping HTML tags from text, does plone have an existing method
David Bain
david.bain at alteroo.com
Tue Mar 4 16:06:56 UTC 2008
Does plone have a built in system/method that I could call for
stripping HTML tags from text?
I've created a portal type that uses body text for the description as well.
It uses portal_transforms to make description be returned as plain text.
Here's a snippet from my code
del schema['description']
def Description(self):
"""
custom description method
"""
portal_transforms = getToolByName(self, 'portal_transforms')
return self.getText(mimetype = 'text/plain')
The problem is I keep getting html tags like <p> and <br /> etc... in
Description
More information about the Product-Developers
mailing list