don't do HTML filtering when pasting urls/text/images

fixes
https://anki.tenderapp.com/discussions/ankidesktop/37752-anki-21-wont-play-audio-files-with-a-blank-in-the-title
This commit is contained in:
Damien Elmes 2020-01-26 19:13:31 +10:00
parent bfb1d5c5f5
commit 9933720994
2 changed files with 2 additions and 2 deletions

View file

@ -1007,7 +1007,7 @@ class EditorWebView(AnkiWebView):
for fn in types:
html = fn(mime)
if html:
return html, False
return html, True
return "", False
def _processUrls(self, mime):

View file

@ -405,7 +405,7 @@ let filterHTML = function(html, internal, extendedMode) {
filterNode(top, extendedMode);
}
let outHtml = top.innerHTML;
if (!extendedMode) {
if (!extendedMode && !internal) {
// collapse whitespace
outHtml = outHtml.replace(/[\n\t ]+/g, " ");
}