I'm trying to pass a user supplied string as a Flask URL parameter.
url_for(func_name, param="string with spaces")
or similar generates a URL with spaces.
If the user enter a string with spaces the generated url has spaces it seems to work.
Also if I enter a URL with %20
it seems to redirect to a url with spaces.
I thought URLs with spaces were a bad idea.
How do I get it to work right (url_for
and redirection)?
Or should I just accept it?
P.S. Is passing a user supplied string as a parameter safe? If not how should I sanitize the user input string?