Back to index

plone3  3.1.7
validateHTML.py
Go to the documentation of this file.
00001 ##parameters=text, description='', **kw
00002 ##
00003 from Products.CMFDefault.exceptions import IllegalHTML
00004 from Products.CMFDefault.utils import scrubHTML
00005 
00006 try:
00007     description = scrubHTML(description)
00008     text = scrubHTML(text)
00009     return context.setStatus(True, text=text, description=description)
00010 except IllegalHTML, errmsg:
00011     return context.setStatus(False, errmsg)