summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-08-21 17:02:48 +0000
committerDries Buytaert <dries@buytaert.net>2004-08-21 17:02:48 +0000
commit7736eb49956ec78dd7fae8891b55103e1747f99d (patch)
tree889a52e2482d411236890482da0a6e1bb1c62193 /includes
parentcb3a404b753d4d34a2c3463f22e0399a2edf79c8 (diff)
downloadbrdo-7736eb49956ec78dd7fae8891b55103e1747f99d.tar.gz
brdo-7736eb49956ec78dd7fae8891b55103e1747f99d.tar.bz2
- 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.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc2
1 files changed, 1 insertions, 1 deletions
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);