Commit dba51ebb authored by Dries's avatar Dries

- Patch #13121 by Goba: valid_url() should allow the use of '+' in URLs.

parent 38c91a8d
......@@ -617,10 +617,10 @@ 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);
return preg_match("/^[a-z0-9\/:_\-_\.,\+]+$/i", $url);
}
}
......
Markdown is supported
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