react-native-pdf
react-native-pdf copied to clipboard
Fix PDF failed to load when the file URI contains an encoded accented character
The decoding of the URI is currently done using unescape.
https://github.com/wonday/react-native-pdf/blob/d545ff27b49850c773f6c443dfc65891881c0ed2/index.js#L238
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.
Possibly related issue https://github.com/wonday/react-native-pdf/issues/697. Also note that unescape is deprecated.