mnemosyne-proj / mnemosyne

Mnemosyne: efficient learning with powerful digital flash-cards.
https://mnemosyne-proj.org/
Other
507 stars 74 forks source link

tests/test_media.py: too naive test fails #241

Open SnarkBoojum opened 1 year ago

SnarkBoojum commented 1 year ago

At line 157, that test fails on my box:

assert full_path_in_media_dir.replace(" ", "%20") in card.question()

and since my full_path_in_media_dir has a '+', while in card.question(), there's a '%2B'... the test fails!

The fix would be to make a serious html-escape of full_path_in_media_dir instead of just a trivial space replacement.

pbienst commented 1 year ago

OK, thanks for pointing this out! Patches are always welcome.