diff --git a/htdocs/lib/functions2.lib.php b/htdocs/lib/functions2.lib.php
index c22c423a5b2b29e3dd3034daf839cc31092ad679..7e75665302aa41cdb9a032811a09638009d749f0 100644
--- a/htdocs/lib/functions2.lib.php
+++ b/htdocs/lib/functions2.lib.php
@@ -256,12 +256,12 @@ function isValidUrl($url,$http=0,$pass=0,$port=0,$path=0,$query=0,$anchor=0)
 	// PATH
 	if ($path) $urlregex .= "(\/([a-z0-9+\$_-]\.?)+)*\/";
 	// GET Query
-	if ($query) $urlregex .= "(\?[a-z+&\$_.-][a-z0-9;:@/&%=+\$_.-]*)";
+	if ($query) $urlregex .= "(\?[a-z+&\$_.-][a-z0-9;:@\/&%=+\$_.-]*)";
 	// ANCHOR
-	if ($anchor) $urlregex .= "(#[a-z_.-][a-z0-9+\$_.-]*)$/i";
+	if ($anchor) $urlregex .= "(#[a-z_.-][a-z0-9+\$_.-]*)$";
 
 	// check
-	if (preg_match('!'.$urlregex.'!', $url))
+	if (preg_match('/'.$urlregex.'/i', $url))
 	{
 		$ValidUrl = 1;
 	}