Skip to content

Commit

Permalink
Fix for issue #17 - "SVG Injector doesn't work if there is a URL para…
Browse files Browse the repository at this point in the history
…meter". Updated the regex that was matching for an svg file extension to allow for query strings.
  • Loading branch information
protodave committed Oct 15, 2014
1 parent 173dc9b commit 55ac808
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion svg-injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
var imgUrl = el.getAttribute('data-src') || el.getAttribute('src');

// We can only inject SVG
if (!(/svg$/i).test(imgUrl)) {
if (!(/\.svg/i).test(imgUrl)) {
callback('Attempted to inject a file with a non-svg extension: ' + imgUrl);
return;
}
Expand Down

0 comments on commit 55ac808

Please sign in to comment.