In the process of looking for solutions to help sanitise some output, I came across code that does the following.
preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $some_url)
Now, I think it's basically trying to remove anything other than the above mentioned characters. But doesn't
\\x80-\\xff refer to some form of non-printable ascii characters ? If so, why would the code possibly be trying NOT to remove them ?
Any indications/pointers/help would be appreciated. Thanks.