diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2018-02-19 17:09:02 +0100 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2018-02-20 12:25:54 +0100 |
| commit | 64be3521cefb1e71047a04e4d05c20308040a2dd (patch) | |
| tree | e9ea5733e1c762989c3e10a90023268fe9dc1acb /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | bd16df15ea6ce7d746e09a48909391c768694396 (diff) | |
[FIX] web_editor: don't format xml with script tag
It happens from time to time that someone use "Format" on the
web.layout template. Thus:
```
<script type="text/javascript">
var odoo = {
csrf_token: "<t t-esc="request.csrf_token(None)"/>",
};
</script>
```
becomes:
```
<script type="text/javascript">
var odoo = {
csrf_token: "
<t t-esc="request.csrf_token(None)"/>",
};
</script>
```
breaking a number of things on the frontend and everything on the
backend.
On a pure javascript content, we could wrap it with:
```
//<![CDATA[
/* javascript content */
//]]>
```
but in this instance we still want the xml to be processed.
This commit avoids formatting XML containing a script tag.
opw-815865
closes #23164
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions
