I want to use a string within a url:
some/url/<mystring>
My problem: mystring
comes directly from a user input where it is allowed to type any special character including dangerous ones, like slash for example. I want to escape those.
EDIT: no, I do not want to escape HTML code. I want to escape the parts of a string, that could make the url directing elsewhere than to url/to/{input}
. (for example /
or ?
)