diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-02-22 10:39:15 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-02-22 10:39:15 +0100 |
| commit | 9a84ba55330204c49e9c72d9e53660dfd11556ae (patch) | |
| tree | 10c207733941a30d5ab86285ecb1c8b130c14200 /addons/web_editor/static/src/js/widgets/ace.js | |
| parent | 898cd0a5c1a9696f051477c1318a76c31eb40a16 (diff) | |
| parent | e750bb6e1149cb05e13424d66d4ff12198b4cffe (diff) | |
[MERGE] forward port branch saas-11.1 up to e750bb6e114
Diffstat (limited to 'addons/web_editor/static/src/js/widgets/ace.js')
| -rw-r--r-- | addons/web_editor/static/src/js/widgets/ace.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/widgets/ace.js b/addons/web_editor/static/src/js/widgets/ace.js index 1b8996beaa5..1057958f983 100644 --- a/addons/web_editor/static/src/js/widgets/ace.js +++ b/addons/web_editor/static/src/js/widgets/ace.js @@ -58,6 +58,10 @@ function checkXML(xml) { * @returns {string} formatted xml */ function formatXML(xml) { + // do nothing if an inline script is present to avoid breaking it + if (/<script(?: [^>]*)?>[^<][\s\S]*<\/script>/i.test(xml)) { + return xml; + } return window.vkbeautify.xml(xml, 4); } /** |
