Added check for external links URLs
authorThierry Florac <thierry.florac@onf.fr>
Fri, 13 Oct 2017 08:35:23 +0200 (2017-10-13)
changeset 220 82ba8b3e99f3
parent 219 fa51a3ae17a1
child 221 348007b1b4b0
Added check for external links URLs
src/pyams_content/component/paragraph/html.py
--- a/src/pyams_content/component/paragraph/html.py	Fri Oct 13 08:34:54 2017 +0200
+++ b/src/pyams_content/component/paragraph/html.py	Fri Oct 13 08:35:23 2017 +0200
@@ -106,7 +106,7 @@
                 link_info.address = email
                 link_info.address_name = name or email
                 link_info.title = {lang: link.attrib.get('title') or link.text}
-        else:
+        elif href.startswith('http://') or href.startswith('https://'):
             for association in associations.values():
                 external_info = IExternalLink(association, None)
                 if (external_info is not None) and (external_info.url == href):