Commit 3c9de6da authored by pg mr's avatar pg mr
Browse files

Added fixes

parent 26c5852d
Pipeline #7766 failed with stages
in 0 seconds
......@@ -248,12 +248,12 @@ def add_prefix(match: re.Match) -> str:
uri = match.group()
prefix = ""
if uri.startswith("www."):
prefix = "https"
prefix = "https://"
elif uri.startswith("ftp."):
prefix = "ftp"
prefix = "ftp://"
elif re.match(r'\w+@\S+\.\S*[^\s\W]', uri): # should match naked username
prefix = "xmpp"
return "<a href=\"%s\">%s</a>" % ("%s://%s" % (prefix, uri), uri)
prefix = "xmpp:"
return "<a href=\"%s\">%s</a>" % (prefix + uri, uri)
return LINK_REGEX.sub(add_prefix, text)
elif "body-markup" in self._daemon_capabilities:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment