From 7736eb49956ec78dd7fae8891b55103e1747f99d Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 21 Aug 2004 17:02:48 +0000 Subject: - Patch #10166 by jvandyk: bugfix: valid_url() believed that URLs with encoded spaces in them (eg. http://example.org/my%20file.html ) are not valid. --- includes/common.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes/common.inc') diff --git a/includes/common.inc b/includes/common.inc index 547740db6..bef2aaef6 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -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); -- cgit v1.2.3