[Erp5-report] r15681 - /erp5/trunk/products/ERP5/Document/TextDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Aug 16 02:38:49 CEST 2007
Author: jp
Date: Thu Aug 16 02:38:48 2007
New Revision: 15681
URL: http://svn.erp5.org?rev=15681&view=rev
Log:
Text Document are intended to support more than just HTML.
Modified:
erp5/trunk/products/ERP5/Document/TextDocument.py
Modified: erp5/trunk/products/ERP5/Document/TextDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TextDocument.py?rev=15681&r1=15680&r2=15681&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TextDocument.py (original)
+++ erp5/trunk/products/ERP5/Document/TextDocument.py Thu Aug 16 02:38:48 2007
@@ -107,15 +107,18 @@
kw.setdefault('text_format', format)
kw.setdefault('text_content', text_content)
del kw['file']
- # check if it's safe to save HTML content
- # By default FCKEditor used to edit Web Pages wouldn't allow inserting
- # HTML tags (will replace them accordingly) so this is the last possible
- # step where we can check if any other scripts wouldn't try to set manually
- # bad HTML content.
- if isHTMLSafe(kw.get('text_content', '')):
- Document._edit(self, **kw)
- else:
- raise ValueError, "HTML contains illegal tags."
+ # The following has been commented because a TextDocument
+ # instance may contain something else than HTML
+ ## Check if it's safe to save HTML content
+ ## By default FCKEditor used to edit Web Pages wouldn't allow inserting
+ ## HTML tags (will replace them accordingly) so this is the last possible
+ ## step where we can check if any other scripts wouldn't try to set manually
+ ## bad HTML content.
+ # if isHTMLSafe(kw.get('text_content', '')):
+ # Document._edit(self, **kw)
+ # else:
+ # raise ValueError, "HTML contains illegal tags."
+ Document._edit(self, **kw)
security.declareProtected( Permissions.ModifyPortalContent, 'edit' )
edit = WorkflowMethod( _edit )
More information about the Erp5-report
mailing list