[Erp5-report] r34039 nicolas - in /erp5/trunk/products/ERP5: Document/ interfaces/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Mar 24 10:05:48 CET 2010
Author: nicolas
Date: Wed Mar 24 10:05:47 2010
New Revision: 34039
URL: http://svn.erp5.org?rev=34039&view=rev
Log:
asSafeHTML is not an option, it will be used in everywhere.
Modified:
erp5/trunk/products/ERP5/Document/Document.py
erp5/trunk/products/ERP5/interfaces/html_convertable.py
Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=34039&r1=34038&r2=34039&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Document.py [utf8] Wed Mar 24 10:05:47 2010
@@ -1178,25 +1178,6 @@
mime, html = self.convert(**kw)
return self._stripHTML(str(html))
- security.declareProtected(Permissions.View, 'asSafeHTML')
- def asSafeHTML(self, **kw):
- """
- Converts the current document to HTML, strip it and remove
- emmbed javascript, forms, any external plugins imports.
- """
- format = 'text/x-html-safe'
- if not self.hasBaseData():
- return ''
- try:
- mime, data = self.getConversion(format=format)
- return data
- except KeyError:
- kw['format'] = 'html'
- mime, html = self.convert(**kw)
- safe_html = self._safeHTML(str(html), format=format)
- self.setConversion(safe_html, mime=mime, format=format)
- return safe_html
-
def _guessEncoding(self, string):
"""
Try to guess the encoding for this string.
Modified: erp5/trunk/products/ERP5/interfaces/html_convertable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/interfaces/html_convertable.py?rev=34039&r1=34038&r2=34039&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/html_convertable.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/html_convertable.py [utf8] Wed Mar 24 10:05:47 2010
@@ -54,13 +54,3 @@
kw -- optional parameters which can be passed to the
conversion engine
"""
-
- def asSafeHTML(**kw):
- """
- Converts the current document to HTML, and remove
- emmbed javascript, forms, any external plugins imports.
-
- kw -- optional parameters which can be passed to the
- conversion engine
- """
-
More information about the Erp5-report
mailing list