summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/editor/summernote.js
diff options
context:
space:
mode:
authorTomas Alvarez <tomas@vauxoo.com>2018-06-06 02:57:53 -0500
committerLucas Perais <lcsperais@gmail.com>2018-06-06 09:57:53 +0200
commit1db6c8d0ad9c5b82add3483d30571457773f1ddb (patch)
tree0b6a4da65682e7f28f0d7dbe7be48aaa0857ccf7 /addons/web_editor/static/src/js/editor/summernote.js
parent654ee788d998299679644bf9c5514baddb4bf0b9 (diff)
[FIX] mail, web_editor: allow tel links in email templates (#24926)
Before this commit: links like `tel:+1-555-555-5555` were being replaced both in javascript (prefixing `http`, when using the summernote editor) and python (prefixing the base url, when they were added directly to the template). After this commit: the replacement is avoided on links with `tel` scheme. This is related to commit: 8b97a39
Diffstat (limited to 'addons/web_editor/static/src/js/editor/summernote.js')
-rw-r--r--addons/web_editor/static/src/js/editor/summernote.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/summernote.js b/addons/web_editor/static/src/js/editor/summernote.js
index 256d20f9d5f..e6bca5e1563 100644
--- a/addons/web_editor/static/src/js/editor/summernote.js
+++ b/addons/web_editor/static/src/js/editor/summernote.js
@@ -2268,7 +2268,7 @@ $.summernote.pluginEvents.backColor = function (event, editor, layoutInfo, backC
};
options.onCreateLink = function (sLinkUrl) {
- if (sLinkUrl.indexOf('mailto:') === 0) {
+ if (sLinkUrl.indexOf('mailto:') === 0 || sLinkUrl.indexOf('tel:') === 0) {
// pass
} else if (sLinkUrl.indexOf('@') !== -1 && sLinkUrl.indexOf(':') === -1) {
sLinkUrl = 'mailto:' + sLinkUrl;