Merge pull request #789 from abdnh/editor-decode-urls

Decode pasted URLs for nicer display
This commit is contained in:
Damien Elmes 2020-10-12 12:33:52 +10:00 committed by GitHub
commit 1aa29f2e79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1130,7 +1130,9 @@ class EditorWebView(AnkiWebView):
processed.append(link)
else:
# not media; add it as a normal link
link = '<a href="{}">{}</a>'.format(token, html.escape(token))
link = '<a href="{}">{}</a>'.format(
token, html.escape(urllib.parse.unquote(token))
)
processed.append(link)
else:
token = html.escape(token).replace("\t", " " * 4)