Added some code to sanitize html

bzr revid: nicolas.vanhoren@openerp.com-20120813125307-d8cycdvtd7ad0f8e
This commit is contained in:
niv-openerp 2012-08-13 14:53:07 +02:00
parent 7341bd30cc
commit 11780a2267
2 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,7 @@ import openerp.tools as tools
from openerp.tools.translate import _
from openerp.tools import float_round, float_repr
import simplejson
from openerp.tools.html_sanitize import html_sanitize
_logger = logging.getLogger(__name__)
@ -229,6 +230,11 @@ class text(_column):
class html(text):
_type = 'html'
_symbol_c = '%s'
def _symbol_f(x):
return html_sanitize(x)
_symbol_set = (_symbol_c, _symbol_f)
import __builtin__

View File

@ -0,0 +1,4 @@
def html_sanitize(x):
return x