ijgnd / anki__pdf_viewer_with_pdfjs

3 stars 2 forks source link

can't handle some characters in filename (e.g. apostrophe) #3

Closed imeed166 closed 1 year ago

imeed166 commented 4 years ago

even though the source file match the name in the card perfectly, when i click on the link, it doesn't do anything for. I tried it with all my cards and i found that it happens to some files even though they are available in the specified folder. i don't know what causes this behavior.

imeed166 commented 4 years ago

I'm using Anki 2.1.33

ijgnd commented 4 years ago

For me it works in 2.1.33 but that doesn't say much.

I need more info.

imeed166 commented 4 years ago

Literally nothing happens but you were right, i tried draging the javascript into a text editor and there seems to be a problem when there is this character "'". for example : "molécule d'adhésion.pdf" doesn't work --> "javascript:pycmd("pdfjs319501851Mol%C3%A9cules d" but "Cytokines (resume).pdf" works --> "javascript:pycmd("pdfjs319501851Cytokines (resume).pdf3195018513");"

imeed166 commented 4 years ago

will there be an update to fix this problem or should i just replace this character with another? thank you very much for helping.

ijgnd commented 4 years ago

There will be a fix but it'll take some time because I'd like to test it first etc. but at the moment I'm busy. So you should change the filenames at the moment.

Thanks for reporting this issue.

ijgnd commented 2 years ago

In case you are still using Anki and are still interested in this add-on ...

I started using this add-on again and now I encode the filenames to avoid such problems.

Before I upload it to ankiweb I'm testing the new release which is available from https://github.com/ijgnd/anki__pdf_viewer_with_pdfjs/releases/download/2022-07-15/anki__pdf_viewer_with_pdfjs__2022-07-15.ankiaddon