Skip to content
Snippets Groups Projects
Commit 6334c728 authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] website_slides: can edit frontend enroll message


The frontend enroll message was display as a `<small/>` tag, but it
seems that lxml HTMLParser parse it wrongly, for example:

  html.tostring(html.fromstring('<small data-oe-model="test"><p></p></small>'))

returns:

  '<div><small data-oe-model="test"></small><p></p></div>'

So branding attributes like data-oe-model that are on small tag are not
found on root node that has become a `div` tag after parsing => this causes
a traceback error when saving a change in this part.

Fix: use small as wrapper for `<div/>` tag that is treated correctly by
HTMLParser (span is also treated correctly but div makes more sense
here).

opw-2573955

closes odoo/odoo#72304

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 7c566661
No related branches found
No related tags found
No related merge requests found
......@@ -314,7 +314,9 @@
</small>
</div>
<div t-else="" class="o_wslides_enroll_msg">
<small t-field="channel.enroll_msg"/>
<small>
<div t-field="channel.enroll_msg"/>
</small>
</div>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment