-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Vue-router decodeURI twice cause URL contains encoded % an URIError: URI malformed #2708
Vue-router decodeURI twice cause URL contains encoded % an URIError: URI malformed #2708
Comments
Relevant post in forum: |
Indeed, we should not decode the search nor the hash in hash mode |
@posva When this fix will be released? |
Thanks for fast response, i guess i have similar but diffrent issue
value that triggers error: |
Check #2725 BTW |
Thanks alot! |
Version
3.0.3
Reproduction link
Sorry, It is hard to supply a minimal reproduction
Steps to reproduce
Visit http://a.b.c/#/test?d=%25
Vue-router will throw a warning
URIError: URI malformed
, and abandon all the query params.What is expected?
DecodeURI once is enough.
What is actually happening?
DecodeURI twice.
ref:
vue-router/src/history/hash.js
Lines 100 to 106 in 627027f
vue-router/src/util/query.js
Lines 37 to 63 in 627027f
The
getHash
method already decoded href, butparseQuery
decode it again. So causedURIError: URI malformed
.Maybe decoding in
getHash
is not necessary.The text was updated successfully, but these errors were encountered: