Skip to content

Commit

Permalink
FIX: File extension error when URL has query parameters
Browse files Browse the repository at this point in the history
When a URL pattern has a query string the file-extension isn't matched correctly IFF the URL has . in the query parameters.
This fix is from original dom-to-image repo by:
https://github.com/CG-man 
tsayen#285
  • Loading branch information
Marc Brooks committed May 21, 2019
1 parent 9922b75 commit 96fceff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dom-to-image-more.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@
}

function parseExtension(url) {
var match = /\.([^\.\/]*?)$/g.exec(url);
var match = /\.([^\.\/]*?)(\?|$)/g.exec(url);
if (match) return match[1];
else return '';
}
Expand Down

0 comments on commit 96fceff

Please sign in to comment.