Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
def _render_link(self, m):
url, text = m.groups()
def _render_link(self, m):
url, text = m.groups()
+ # Treat linkes starting with a double slash as absolute
+ if url.startswith("//"):
+ # Remove the double-lash
+ url = url.removeprefix("/")
+
+ # Return a link
+ return """<a href="%s">%s</a>""" % (url, text or url)
+
# External Links
for schema in self.schemas:
if url.startswith(schema):
# External Links
for schema in self.schemas:
if url.startswith(schema):