Commit a11a8b04 authored by Ivan Tyagov's avatar Ivan Tyagov

Do not fail if text_content is missing when editing TextDocument instances.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15067 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d8c3a371
...@@ -112,7 +112,7 @@ class TextDocument(Document, TextContent): ...@@ -112,7 +112,7 @@ class TextDocument(Document, TextContent):
# HTML tags (will replace them accordingly) so this is the last possible # 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 # step where we can check if any other scripts wouldn't try to set manually
# bad HTML content. # bad HTML content.
if isHTMLSafe(kw['text_content']): if isHTMLSafe(kw.get('text_content', '')):
Document._edit(self, **kw) Document._edit(self, **kw)
else: else:
raise ValueError, "HTML contains illegal tags." raise ValueError, "HTML contains illegal tags."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment