summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js
diff options
context:
space:
mode:
authorIvan Yelizariev <iel@odoo.com>2020-12-04 13:41:56 +0000
committerIvan Yelizariev <iel@odoo.com>2020-12-08 16:09:47 +0000
commit5b62b40713d28cc905fd4c54de13cf2de39d988d (patch)
tree52e58136cb5dc9176c6b11561656d996e135d229 /addons/mail/static/src/js
parent46fd7d7979f25c5fe8fe36999186a10ffb6376dc (diff)
[FIX] mail: turn tagged name with special characters into links
STEPS: * Created partner with following name: Putin's spokesman * Tag the partner in a message: @Putin's spokesman BEFORE: tag is not converted into a link AFTER: the link is created WHY: _generateMentionsLinks uses ``owl.utils.escape`` which is different from ``_.escape`` https://github.com/odoo/odoo/blob/880555b38dee0c3e3b364c19bb6b0db983bf8aa0/addons/mail/static/src/models/composer/composer.js#L659 So following replace didn't work: https://github.com/odoo/odoo/blob/880555b38dee0c3e3b364c19bb6b0db983bf8aa0/addons/mail/static/src/models/composer/composer.js#L667 --- opw-2408863 closes odoo/odoo#62893 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/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 bbb9a535716..c65b4b339b3 100644
--- a/addons/mail/static/src/js/utils.js
+++ b/addons/mail/static/src/js/utils.js
@@ -146,7 +146,7 @@ function parseEmail(text) {
*/
function escapeAndCompactTextContent(content) {
//Removing unwanted extra spaces from message
- let value = _.escape(content).trim();
+ let value = owl.utils.escape(content).trim();
value = value.replace(/(\r|\n){2,}/g, '<br/><br/>');
value = value.replace(/(\r|\n)/g, '<br/>');