From cc547da0f88c1cb6d4f87c5a548e7f1640d963a7 Mon Sep 17 00:00:00 2001 From: "Hubert Van de Walle (huvw)" Date: Tue, 29 Nov 2022 07:49:47 +0000 Subject: [PATCH] [FIX] website_slides: allow unsanitized html in the course description Steps to reproduce ================== - Install website_slides - Go to eLearning > Basics of Gardening - Enter edit mode - Drop the tabs section from the right to the purple header - Save -> We can't switch tabs Cause of the issue ================== The `description` and `description_short` were converted from Text field to Html fields in 6d914c005183aa5ae69650e3002a5a85ca83b4a6 Solution ======== Set the `sanitize_form` and `sanitize_attributes` to False See odoo/odoo#47318 opw-2950825 closes odoo/odoo#107314 X-original-commit: e7f0f0a33bdee8520838a128e42cd4bdbd75267d Signed-off-by: Thibault Delavallee (tde) --- addons/website_slides/models/slide_channel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_slides/models/slide_channel.py b/addons/website_slides/models/slide_channel.py index 8654008772e..e0d96728112 100644 --- a/addons/website_slides/models/slide_channel.py +++ b/addons/website_slides/models/slide_channel.py @@ -210,8 +210,8 @@ class Channel(models.Model): # description name = fields.Char('Name', translate=True, required=True) active = fields.Boolean(default=True, tracking=100) - description = fields.Html('Description', translate=True, help="The description that is displayed on top of the course page, just below the title") - description_short = fields.Html('Short Description', translate=True, help="The description that is displayed on the course card") + description = fields.Html('Description', translate=True, sanitize_attributes=False, sanitize_form=False, help="The description that is displayed on top of the course page, just below the title") + description_short = fields.Html('Short Description', translate=True, sanitize_attributes=False, sanitize_form=False, help="The description that is displayed on the course card") description_html = fields.Html('Detailed Description', translate=tools.html_translate, sanitize_attributes=False, sanitize_form=False) channel_type = fields.Selection([ ('training', 'Training'), ('documentation', 'Documentation')],