From de974f94db52f2daa0c0c23b6f79ab9709cc1e0a Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Sun, 5 Sep 2021 16:10:34 +0300 Subject: [PATCH] avoid possible performance hit --- qt/aqt/editor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index df22dcc45..d4019ab77 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -1172,7 +1172,8 @@ class EditorWebView(AnkiWebView): # try various content types in turn if mime.hasHtml(): - return mime.html().replace("", ""), 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://"):