From 84813e7a707c4831419a657eb286e3011bb4ecff Mon Sep 17 00:00:00 2001 From: "Maruan Aguerdouh (magm)" Date: Tue, 26 Sep 2023 15:36:35 +0200 Subject: [PATCH] [FIX] website_slides: article content plain text visible in fullscreen Steps to reproduce: - Get the eLearning App. - Go to an existing course or create a new one. - Add a new content of type article. - Go to website preview and to edit this slide. - Write plain text inside the box of content. - Go to Fullscreen. The issue is that we are using `.append()` and this expects that we pass it an html or a jquery object which is not the case when we just type plain text inside it, so using `.html()` will allow us to render any content as HTML. opw-3265113 closes odoo/odoo#144818 X-original-commit: 34b78a6619888ebbc6e67b5c474260453a7ed84b Signed-off-by: Thibault Delavallee (tde) --- .../static/src/js/slides_course_fullscreen_player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_slides/static/src/js/slides_course_fullscreen_player.js b/addons/website_slides/static/src/js/slides_course_fullscreen_player.js index 3b4ed513bea..311a1905337 100644 --- a/addons/website_slides/static/src/js/slides_course_fullscreen_player.js +++ b/addons/website_slides/static/src/js/slides_course_fullscreen_player.js @@ -668,7 +668,7 @@ $content.empty().append(renderToElement('website.slides.fullscreen.video.google_drive', {widget: this})); } else if (slide.category === 'article'){ var $wpContainer = $('
').addClass('o_wslide_fs_article_content bg-white block w-100 overflow-auto'); - $(slide.htmlContent).appendTo($wpContainer); + $wpContainer.html(slide.htmlContent); $content.append($wpContainer); this.trigger_up('widgets_start_request', { $target: $content,