diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-06-15 13:27:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-06-15 13:27:27 +0200 |
| commit | 73652a0b196b51ec1f9a27880d0b398fb79bfca3 (patch) | |
| tree | 04e741fefdbb859dffa66a4037da7777ea980476 /addons/web_editor/static/src | |
| parent | 8a03563269c3dc55c9c7157494af51e2485f1a14 (diff) | |
| parent | 50860317ccd2c1b44f873598858a3cff87fa7ea6 (diff) | |
[MERGE] forward port branch saas-11.3 up to 50860317ccd
Note: 1aacc962620982528a3dfc90d2c1dd0027359375 has been ignored and will
be forward-ported later
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/rte.summernote.js | 2 | ||||
| -rw-r--r-- | addons/web_editor/static/src/js/widgets/widgets.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/rte.summernote.js b/addons/web_editor/static/src/js/editor/rte.summernote.js index ce20c53ff49..14c0e26cab9 100644 --- a/addons/web_editor/static/src/js/editor/rte.summernote.js +++ b/addons/web_editor/static/src/js/editor/rte.summernote.js @@ -488,7 +488,7 @@ function prettify_html(html) { while (i--) space += ' '; return space; }, - reg = /^<\/?(a|span|font|strong|u|i|strong|b)(\s|>)/i, + reg = /^<\/?(a|span|font|u|em|i|strong|b)(\s|>)/i, inline_level = Infinity, tokens = _.compact(_.flatten(_.map(html.split(/</), function (value) { value = value.replace(/\s+/g, ' ').split(/>/); diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index ab8f166d221..d0df042fa82 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -1406,6 +1406,8 @@ var LinkDialog = Dialog.extend({ if (dom.ancestor(nodes[i], dom.isImg)) { this.data.images.push(dom.ancestor(nodes[i], dom.isImg)); text += '[IMG]'; + } else if (!is_link && nodes[i].nodeType === 1) { + // just use text nodes from listBetween } else if (!is_link && i===0) { text += nodes[i].textContent.slice(so, Infinity); } else if (!is_link && i===nodes.length-1) { |
