summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/utils.js
diff options
context:
space:
mode:
authorJulien (juc) Castiaux <juc@odoo.com>2019-01-14 15:26:29 +0000
committerJulien (juc) Castiaux <juc@odoo.com>2019-01-15 09:02:12 +0000
commit357b374a7e1be3ab8e3778aeb962bd396fe6f419 (patch)
tree6ed539aefb7edf37e333fc6ea4f3c672d172f6e4 /addons/mail/static/src/js/utils.js
parent180ace7b1bcef74149bc85cf2e68a0b9acdcbc09 (diff)
[FIX] mail: URL with semi-colon
When posting a URL containing a semicolon, odoo stops the link before the semicolon instead of continuing the link to the end although it is a valid characters in URL (see RFC-3986) e.g. the url "example.com&foo;bar" matches "example.com&foo" instead of the whole link opw-1918367 closes odoo/odoo#30198
Diffstat (limited to 'addons/mail/static/src/js/utils.js')
-rw-r--r--addons/mail/static/src/js/utils.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/utils.js b/addons/mail/static/src/js/utils.js
index b4e0c01a23a..a735d261d93 100644
--- a/addons/mail/static/src/js/utils.js
+++ b/addons/mail/static/src/js/utils.js
@@ -61,7 +61,7 @@ function _parse_and_transform(nodes, transform_function) {
// Suggested URL Javascript regex of http://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url
// Adapted to make http(s):// not required if (and only if) www. is given. So `should.notmatch` does not match.
-var url_regexp = /\b(?:https?:\/\/|(www\.))[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,13}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi;
+var url_regexp = /\b(?:https?:\/\/|(www\.))[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,13}\b([-a-zA-Z0-9@:%_\+.~#?&//=;]*)/gi;
function linkify(text, attrs) {
attrs = attrs || {};
if (attrs.target === undefined) {