mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
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:
parent
bfb1d5c5f5
commit
9933720994
2 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
|
|
|
@ -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, " ");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue