In the process of finding solutions to help sanitize some of the results, I came across code that does the following.
preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $some_url)
Now I think that he is basically trying to remove anything other than the above characters. But does \\x80-\\xffany form of non-printable ascii character apply? If so, why does the code probably try NOT to delete them?
Any directions / pointers / help would be appreciated. Thank.
source
share