Remove CF_HTML header workaround

This commit is contained in:
Damien Elmes 2022-06-18 09:56:06 +10:00
parent bbe4e9e797
commit 595c92730f

View file

@ -1345,10 +1345,6 @@ class EditorWebView(AnkiWebView):
if not mime.hasHtml():
return
html = mime.html()
if is_win and qtmajor == 6:
# workaround Qt including CF_HTML header in clipboard
# FIXME: remove after we switch to Qt 6.2.5/6.3.1+.
html = re.sub(r"^Version:0.9(.|\r|\n)+?SourceURL:.*?\r\n", "", html)
mime.setHtml(f"<!--anki-->{html}")
aqt.mw.progress.timer(10, lambda: clip.setMimeData(mime), False, parent=self)