Merge pull request #9364 from shikhar-scs/change-decodeURI-to-decodeURIcomponent

changed decodeURI to decodeURIComponent: Fixes #8987
This commit is contained in:
Tim van der Meij 2018-01-15 22:05:48 +01:00 committed by GitHub
commit 1ad33c4514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,7 +365,7 @@ class PDFNodeStreamFsFullReader extends BaseFullReader {
constructor(stream) {
super(stream);
let path = decodeURI(this._url.path);
let path = decodeURIComponent(this._url.path);
// Remove the extra slash to get right path from url like `file:///C:/`
if (fileUriRegex.test(this._url.href)) {
@ -392,7 +392,7 @@ class PDFNodeStreamFsRangeReader extends BaseRangeReader {
constructor(stream, start, end) {
super(stream);
let path = decodeURI(this._url.path);
let path = decodeURIComponent(this._url.path);
// Remove the extra slash to get right path from url like `file:///C:/`
if (fileUriRegex.test(this._url.href)) {