Skip to content
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

Fix PDF failed to load when the file URI contains an encoded accented character #873

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

bernhardoj
Copy link
Contributor

The decoding of the URI is currently done using unescape.

path: unescape(uri.replace(/file:\/\//i, '')),

However, this fails if the URI contains an encoded accented name, for example:

ù is encoded to %C3%B9, but decoding it using unescape gives ù.

This PR replaces unescape with decodeURIComponent.

@jjcoffee
Copy link

jjcoffee commented Oct 2, 2024

Possibly related issue #697. Also note that unescape is deprecated.

@wonday wonday merged commit 3764236 into wonday:master Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants