Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix download extensions pattern #247


Copy link

when the param in link contains download extensions, it will match the old downlod extensions pattern.

var downloadExtensionsPattern = new RegExp('\.(' + 'jpg' + ')([?&#]|$)', 'i');
// the result will be true

// if we fix the download extensions pattern as follows
var downloadExtensionsPattern = new RegExp('^[^\\?]+\.(' + 'jpg' + ')([?&#]|$)', 'i');
// then it will be false

Although I think the better solution is to support customizing the downloadExtensionsPattern.

Copy link

mattab commented Mar 26, 2014

it fails the build "download (is param) "
because actually this feature is by design... so won't fix

PS: you can already customise the download extensions:

@mattab mattab closed this Mar 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants