Skip to content
This repository was archived by the owner on Sep 5, 2022. It is now read-only.

Conversation

gedkott
Copy link
Contributor

@gedkott gedkott commented Dec 6, 2015

The previous fix did not test a corner case where
the user passes extensions allowed in the options.
When there are no options passed for extensions
allowed the extension check is skipped and thus the
file is processed appropriately.

I added virtual copies of the tests so feel free to
point me to a better way of doing that. I just don't
know what a better way to do it is without overwriting
the original tests.

The fix I made was stripping query strings and hashes
from the regex results before the extension check and
then passing in that stripped version into the check
instead of the actual result which has the hash and/or
query string.

The previous fix did not test a corner case where
the user passes extensions allowed in the options.
When there are no otpions passed for extensions
allowed the extension check is skipped and thus the
file is processed appropriately.

I added virtual copies of the tests so feel free to
point me to a better way of doing that. I just don't
know what a better way to do it is without overwriting
the original tests.

The fix I made was stripping query strings and hashes
from the regex results before the extension check and
then passing in that stripped version into the check
instead of the actual result which has the hash and/or
query string.
@zckrs
Copy link
Owner

zckrs commented Dec 23, 2015

Thank you and good catch 👍.

#31 can be closed ?

zckrs pushed a commit that referenced this pull request Dec 23, 2015
Fixes URLs contains query strings or hashes with extension option
@zckrs zckrs merged commit b4bea73 into zckrs:master Dec 23, 2015
@zckrs
Copy link
Owner

zckrs commented Dec 23, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants