Skip to content
Snippets Groups Projects
Commit e8ee0bcd authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #40209 by pascal and jvandyk: added missing semicolon to URL validation.

parent 8a478d50
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -689,7 +689,7 @@ function valid_email_address($mail) { ...@@ -689,7 +689,7 @@ function valid_email_address($mail) {
* TRUE if the URL is in a valid format. * TRUE if the URL is in a valid format.
*/ */
function valid_url($url, $absolute = FALSE) { function valid_url($url, $absolute = FALSE) {
$allowed_characters = '[a-z0-9\/:_\-_\.\?\$,~=#&%\+]'; $allowed_characters = '[a-z0-9\/:_\-_\.\?\$,;~=#&%\+]';
if ($absolute) { if ($absolute) {
return preg_match("/^(http|https|ftp):\/\/". $allowed_characters ."+$/i", $url); return preg_match("/^(http|https|ftp):\/\/". $allowed_characters ."+$/i", $url);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment