-
- Downloads
[FIX] web_editor: prevent editing of header
The way the live HTML editor for html_field works means the header (and other nodes that should only appear once) are removed and the content inserted inside the body. This results in values being edited without the user being aware. For emails, this results in any email using 'style' in the header to break on GMail and other clients that do not support 'style' outside of the header. When an html_field is passed a value containing a header the html_field appears readonly and the user is able to toggle the code view. Which enables them to edit the 'raw' HTML and see changes while preventing the presentation view from affecting the database value task - 3035163 Part-of: odoo/odoo#105406
Showing
- addons/web_editor/static/src/js/backend/html_field.js 17 additions, 9 deletionsaddons/web_editor/static/src/js/backend/html_field.js
- addons/web_editor/static/src/js/backend/html_field.xml 8 additions, 6 deletionsaddons/web_editor/static/src/js/backend/html_field.xml
- addons/web_editor/static/tests/html_field_tests.js 130 additions, 0 deletionsaddons/web_editor/static/tests/html_field_tests.js
Loading