Added some code to sanitize html
bzr revid: nicolas.vanhoren@openerp.com-20120813125307-d8cycdvtd7ad0f8e
This commit is contained in:
parent
7341bd30cc
commit
11780a2267
|
@ -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__
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
|
||||
def html_sanitize(x):
|
||||
return x
|
Loading…
Reference in New Issue