just-path returns different results for clj and cljs
klimenko-serj opened this issue · comments
When url contains encoded symbols just-path
works in different ways on java and javascript.
qwe/asd%20zxc
-> qwe/asd%20zxc
on java,
-> qwe/asd zxc
on js.
It seem goog.Uri.getPath
automatically decodes uri. But java.net.URI/getRawPath
keeps it encoded.
I believe there was a reason to get it with encoding in. The result from goog.Uri should likely be URI encoded afterwards to match, but I'm not certain.
Does this casue #155 to behave differently for clj & cljs?
yes, when I use regex [#".+" :par]
:par is decoded in cljs, but it's encoded in clj. It is not big problem for me, but I just noticed difference in behavior.
I just got bitten by goog.Uri.getPath
:
(new goog.Uri('http://bidi.bidi/%25_%5C')).getPath()
=> "/%25_\"
I would expect either "/%25_%5C"
or "%_\"
, but not something in between.
Created google/closure-library#1083