Openerp odoo中html类型字段中的sanitize属性有什么用途?

Openerp odoo中html类型字段中的sanitize属性有什么用途?,openerp,odoo-10,language-translation,Openerp,Odoo 10,Language Translation,在html类型的字段中,有一个属性可用,我们可以在其中传递True/False body_html = fields.Html('Body', translate=True, sanitize=False, help="Rich-text/HTML version of the message (placeholders may be used here)") body_html = fields.Html('Body', translate=True, sanitize=True, help

在html类型的字段中,有一个属性可用,我们可以在其中传递True/False

body_html = fields.Html('Body', translate=True, sanitize=False, help="Rich-text/HTML version of the message (placeholders may be used here)")

body_html = fields.Html('Body', translate=True, sanitize=True, help="Rich-text/HTML version of the message (placeholders may be used here)")
如果我们设置为真/假,那么我们将得到相同的结果。


如果我们在这个字段中设置True/False有什么区别?

它只是告诉Odoo是否要清除html代码,比如删除脚本、标记/节点等。有关更多信息,请查看