Skip to content

Commit

Permalink
Merge pull request #350 from freelawproject/fix-issue-with-relative-u…
Browse files Browse the repository at this point in the history
…rl-in-firefox

feat(content_delegate): Use the URL constructor to return absolute URL
  • Loading branch information
mlissner authored Nov 17, 2023
2 parents 80204db + 19d80da commit 9b66550
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/content_delegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,10 @@ ContentDelegate.prototype.onDownloadAllSubmit = async function (event) {
return null;
}
// Clean the match found in the HTML
return showTempURL[0].replace(';"', '');
let relativePath = showTempURL[0].replace(/\"|;/, '');

// Use absolute paths to avoid issue with Firefox.
return new URL(relativePath, window.location);
};

// helper function - convert string to html document
Expand Down

0 comments on commit 9b66550

Please sign in to comment.