From 14c7af50fec8f89e0030084680ac7dddf639b699 Mon Sep 17 00:00:00 2001 From: qsm-odoo <qsm@odoo.com> Date: Mon, 2 Oct 2017 14:50:07 +0200 Subject: [PATCH] [FIX] website: prevent dropping snippets in <p/> Main snippets can be dropped in `.oe_structure` elements and `[data-oe-type=html]` elements. The second case happens when adding a field in a page thanks to `t-field`. If used on a <p/> element, the content cannot contain snippets (as browsers will not allow <div/> and <section/> in a <p/>). Note: we should not use <p/> with HTML fields at all but this might happen with old databases... or by mistake. The problem is that the problem is not visible during development without this fix. --- addons/website/views/snippets.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/views/snippets.xml b/addons/website/views/snippets.xml index 5fb0707d6965..b2ce99aa40d7 100644 --- a/addons/website/views/snippets.xml +++ b/addons/website/views/snippets.xml @@ -898,7 +898,7 @@ <div data-js='resize' data-selector="section, :not(.o_gallery > .container) > .carousel, .parallax" - data-drop-in=".oe_structure, [data-oe-type=html]"> + data-drop-in=":not(p).oe_structure, :not(p)[data-oe-type=html]"> </div> <div data-js='margin-x' -- GitLab