diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index b5978b96efe..afec04f764a 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -1966,7 +1966,8 @@ var SnippetsMenu = Widget.extend({ .addClass('oe_snippet') .each((i, el) => { const $snippet = $(el); - const name = el.getAttribute('name'); + const name = _.escape(el.getAttribute('name')); + const thumbnailSrc = _.escape(el.dataset.oeThumbnail); const $sbody = $snippet.children().addClass('oe_snippet_body'); const isCustomSnippet = !!el.closest('#snippet_custom'); @@ -1983,7 +1984,7 @@ var SnippetsMenu = Widget.extend({ // Create the thumbnail const $thumbnail = $(`
-
+
${name}
`);