Skip to content

Commit

Permalink
fix: Failed to load documents from URL that contains "%26" or "%3F" etc.
Browse files Browse the repository at this point in the history
Fixes #711
  • Loading branch information
MurakamiShinyu committed Mar 24, 2021
1 parent 3c690f6 commit c7da706
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/vivliostyle/epub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ export class OPFDoc {
epubBaseURL += "/";
}
return url.substr(0, epubBaseURL.length) == epubBaseURL
? decodeURI(url.substr(epubBaseURL.length))
? decodeURIComponent(url.substr(epubBaseURL.length))
: null;
} else {
return url;
Expand Down Expand Up @@ -1013,7 +1013,7 @@ export class OPFDoc {
const entry = zipMetadata[i];
const encodedPath = entry["n"];
if (encodedPath) {
const path = decodeURI(encodedPath);
const path = decodeURIComponent(encodedPath);
const item = this.itemMapByPath[path];
let mediaType: string | null = null;
if (item) {
Expand Down

1 comment on commit c7da706

@vercel
Copy link

@vercel vercel bot commented on c7da706 Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.