summaryrefslogtreecommitdiff
path: root/addons/website_livechat/models
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2016-08-19 13:49:48 +0200
committerThibault Delavallée <tde@openerp.com>2016-08-30 15:54:56 +0200
commit02c748be59ac8abc44c945218587e7b8a8e06a28 (patch)
tree1e68f807714a08b850c66b8d9c9b02e47fdc3a5b /addons/website_livechat/models
parent97425bfe3f2b317595e7086aedf7b5689dc9d218 (diff)
[IMP] tools: sanitizer: add and clean sanitize options
Now having * sanitize: run the sanitizer to clean the html (removing javascripts, unwanted tags, ...) * sanitize_tags: only a subset of tags is allowed in html content. Unwelcomed tags are remove dand their content stripped. * sanitize_attributes: only a subset of attributes is allowed. * sanitize_style: only a subset of style attributes is allowed. Style attributes are parsed to keep only a white list. * strip_style: all style is removed. It bypasses sanitize_style as there is no need to sanitize something that is removed. * strip_classes: remove class attributes Fields parameters have also been updated to match the sanitize options. Html fields by default are sanitized with sanitize_tags activated but without any further options. All addons have been updated to match the new options according to their previous behavior.
Diffstat (limited to 'addons/website_livechat/models')
-rw-r--r--addons/website_livechat/models/im_livechat.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_livechat/models/im_livechat.py b/addons/website_livechat/models/im_livechat.py
index f73d3b594f7..17ad3f89a12 100644
--- a/addons/website_livechat/models/im_livechat.py
+++ b/addons/website_livechat/models/im_livechat.py
@@ -17,4 +17,4 @@ class ImLivechatChannel(models.Model):
for channel in self:
channel.website_url = "/livechat/channel/%s" % (slug(channel),)
- website_description = fields.Html("Website description", default=False, help="Description of the channel displayed on the website page", sanitize=False, translate=html_translate)
+ website_description = fields.Html("Website description", default=False, help="Description of the channel displayed on the website page", sanitize_attributes=False, translate=html_translate)