Web lists-archives.com

[PHP] Utf8 issues with FILTER_SANITIZE_URL




Hi all,

I've noticed that the santisation filter FILTER_SANITIZE_URL is not working quite as the documentation suggests.

Particularly, this filter says it removes all characters except letters, digits, and a small list of specific characters. However, I took letters in this context to be the same as \p{L} that the preg_* functions support, but it appears it's actually only meaning [a-zA-Z] here. I need characters like êéö to not be stripped (these are valid in URLs and have been widely supported in browsers and servers for years)

Is utf8 support on this filter intentionally missing, or is there a flag I need to set in order for it to work correctly.

Thanks,
Ash
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.