avoid possible performance hit

This commit is contained in:
Ren Tatsumoto 2021-09-05 16:10:34 +03:00
parent 7451ad68b1
commit de974f94db

View File

@ -1172,7 +1172,8 @@ class EditorWebView(AnkiWebView):
# try various content types in turn
if mime.hasHtml():
return mime.html().replace("<!--anki-->", ""), internal
html_content = mime.html()[11:] if internal else mime.html()
return html_content, internal
# favour url if it's a local link
if mime.hasUrls() and mime.urls()[0].toString().startswith("file://"):