-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URI-escape image filenames #10268
URI-escape image filenames #10268
Conversation
Without this change, local images with `#` in their name result in incorrect URLs There is already a similar call to `urllib.parse.quote` for file downloads, suggesting this is a sensible approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Could you add a testcase for this, please? Then I'll merge this soon.
#9670 didn't have a test-case, so I was hoping I could get away without one here too... I might have time for a test-case in a week or so, we'll see. |
It seems #9670 contains a test-case :-) |
Hmm... epubcheck and LaTeX build are failed when we use |
It sounds like the latex code needs escaping too |
Thanks for fixing the broken tests! |
Is there any way to see the latex error message from CI? |
I think the CI failure is actually a bug in |
@eric-wieser it looks like the test failures are pretty simple to solve--are you up for having a look, it would be nice to get this in to 5.3. A |
Thanks @eric-wieser! A |
Without this change, local images with
#
in their name result in incorrect URLs in HTML builds.There is already a similar call to
urllib.parse.quote
for file downloads, added in #9670, suggesting this is a sensible approach.This also adds a hack to make things work for
#
specifically in LaTeX, but more work is likely needed for other weird character there.Feature or Bugfix