mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
fix copying images with filenames containing reserved chars (#3775)
This commit is contained in:
parent
b65fa693da
commit
00501c267c
1 changed files with 2 additions and 1 deletions
|
@ -1105,7 +1105,8 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
|
|||
# with allowed_suffixes=pics, all non-pics will be rendered as <a>s and won't be included here
|
||||
if not (images := self.mw.col.media.files_in_str(self.note.mid, html)):
|
||||
return None
|
||||
return os.path.join(self.mw.col.media.dir(), images[0])
|
||||
image_path = urllib.parse.unquote(images[0])
|
||||
return os.path.join(self.mw.col.media.dir(), image_path)
|
||||
|
||||
def select_image_from_clipboard_and_occlude(self) -> None:
|
||||
"""Set up the mask editor for the image in the clipboard."""
|
||||
|
|
Loading…
Reference in a new issue