[FIX] link_tracker: do not track 'tel:' or 'sms:' links
- Create a mass mailing including a 'tel' or 'sms' link, e.g. `<a href="tel:555-000-0000">555-000-0000</a>` - When sent, the link is converted to a tracked linked (`http://...`) We do not want to convert these links, they should be handled by the browser directly. opw-765885
This commit is contained in:
@@ -15,7 +15,7 @@ from werkzeug import url_encode, unescape
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.tools import ustr
|
||||
|
||||
URL_REGEX = r'(\bhref=[\'"](?!mailto:)([^\'"]+)[\'"])'
|
||||
URL_REGEX = r'(\bhref=[\'"](?!mailto:|tel:|sms:)([^\'"]+)[\'"])'
|
||||
|
||||
def VALIDATE_URL(url):
|
||||
if urlparse(url).scheme not in ('http', 'https', 'ftp', 'ftps'):
|
||||
|
||||
Reference in New Issue
Block a user