I have a web app, which allows searching. So when I go to somedomain.com/search/<QUERY>
it searches for entities according to <QUERY>
. The problem is, when I try to search for .
or ..
it doesn't work as expected (which is pretty obvious). What surprised me though, is that if I manually enter the url of somedomain.com/search/%2E
, the browser (tested Chrome and IE11) converts it somedomain.com/search/
and issues a request without necessary payload.
So far I haven't found anything that would say it's not possible to make this work, so I came here. Right now I have only one option: replacing .
and ..
to something like __dotPlaceholder__
, but this feels like a dirty hack to me.
Any solution (js or non-js) will be welcomed. Any information on why do browsers strip url-encoded dots is also a nice-to-have.
Unfortunately part of RFC3986 defines the URI dot segments to be normalised and stripped out in that case, ie http://example.com/a/./
to become http://example.com/a
see https://www.rfc-editor.org/rfc/rfc3986#page-33 for more information
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With