Commit 7736eb49 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #10166 by jvandyk: bugfix: valid_url() believed that URLs with encoded spaces in them (eg. ) are not valid.
parent cb3a404b
......@@ -608,7 +608,7 @@ function valid_email_address($mail) {
function valid_url($url, $absolute = FALSE) {
if ($absolute) {
return preg_match("/^(http|https|ftp):\/\/[a-z0-9\/:_\-_\.\?,~=#&]+$/i", $url);
return preg_match("/^(http|https|ftp):\/\/[a-z0-9\/:_\-_\.\?,~=#&%]+$/i", $url);
else {
return preg_match("/^[a-z0-9\/:_\-_\.,]+$/i", $url);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment