[FIX] mail: linkify livechat message so frontend has them
In ff56304f58 a solution was tried to have message posted from
backend livechat linkified for visitor in frontend. This was
forward-ported when it should not have been and introduced issues
including:
- `href="{link}"` would become `href="<a href="{link}">{link}</a>"`
- if html entities such as the ones for U+00A0, and entities <, >,
', " or ` were next to the link, the entity would be linkified
too (up to the ;)
This happen because utils.linkify function is to be used with text
content and not html which was the case in this instance.
opw-693457
opw-702410
This commit is contained in:
@@ -667,7 +667,7 @@ var chat_manager = {
|
||||
// to linkify the urls we end up with double linkification a bit everywhere.
|
||||
// Ideally we want to keep the content as text internally and only make html
|
||||
// enrichment at display time but the current design makes this quite hard to do.
|
||||
var body = utils.linkify(_.str.trim(data.content));
|
||||
var body = utils.parse_and_transform(_.str.trim(data.content), utils.add_link);
|
||||
|
||||
var msg = {
|
||||
partner_ids: data.partner_ids,
|
||||
|
||||
Reference in New Issue
Block a user