]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/backend/wiki.py
wiki: Fix handling @ in links
[ipfire.org.git] / src / backend / wiki.py
index 4be8550c860cd279955f34ed89a1ff2490e312d7..96e0787b0f715891ca87dcca326b6f205da8674d 100644 (file)
@@ -596,6 +596,12 @@ class WikiRenderer(misc.Object):
        def _render_link(self, m):
                url, text = m.groups()
 
+               # External Links
+               for schema in self.schemas:
+                       if url.startswith(schema):
+                               return """<a class="link-external" href="%s">%s</a>""" % \
+                                       (url, text or url)
+
                # Emails
                if "@" in url:
                        # Strip mailto:
@@ -605,12 +611,6 @@ class WikiRenderer(misc.Object):
                        return """<a class="link-external" href="mailto:%s">%s</a>""" % \
                                (url, text or url)
 
-               # External Links
-               for schema in self.schemas:
-                       if url.startswith(schema):
-                               return """<a class="link-external" href="%s">%s</a>""" % \
-                                       (url, text or url)
-
                # Everything else must be an internal link
                path = self.backend.wiki.make_path(self.path, url)