You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like Uri object only decodes query parameter values and keeps the rest of the segments "as is". Which leads to what seems to be inconsistent output for the most of its methods, especially .toString() and .query(). Please see the example below.
varencodedStr=encodeURI('http://ářé.html?ářé=ářé#ářé');varurl=newUri(encodedStr);url.host();// encoded string;url.getQueryParamValue('ářé');// decoded stringurl.queryPairs;// both query parameter name and value are decodedurl.query();// mixed encoded and decoded charactersurl.anchor();// encoded stringurl.toString();// mixed encoded and decoded characters
It would be much easier for client code to consume the output of those methods if they always yield fully encoded or decoded strings.
The text was updated successfully, but these errors were encountered:
Hello Derek,
Thank you for the great library!
It seems like
Uri
object only decodes query parameter values and keeps the rest of the segments "as is". Which leads to what seems to be inconsistent output for the most of its methods, especially .toString() and .query(). Please see the example below.It would be much easier for client code to consume the output of those methods if they always yield fully encoded or decoded strings.
The text was updated successfully, but these errors were encountered: