@@ -301,7 +301,7 @@ function admFuncProcessableImageSize()
301301 * @param array<string,mixed> $array The array with the element that should be checked
302302 * @param string $variableName Name of the array element that should be checked
303303 * @param string $datatype The datatype like **string**, **numeric**, **int**, **float**, **bool**, **boolean**, **html**,
304- * **date**, **file** or **folder** that is expected and which will be checked.
304+ * **url**, ** date**, **file** or **folder** that is expected and which will be checked.
305305 * Datatype **date** expects a date that has the Admidio default format from the
306306 * preferences or the english date format **Y-m-d**
307307 * @param array<string,mixed> $options (optional) An array with the following possible entries:
@@ -387,7 +387,8 @@ function admFuncVariableIsValid(array $array, $variableName, $datatype, array $o
387387
388388 switch ($ datatype )
389389 {
390- case 'file ' :
390+ case 'file ' : // fallthrough
391+ case 'folder ' :
391392 try
392393 {
393394 if ($ value !== '' )
@@ -461,6 +462,12 @@ function admFuncVariableIsValid(array $array, $variableName, $datatype, array $o
461462 // check html string vor invalid tags and scripts
462463 $ value = Htmlawed::filter (stripslashes ($ value ), array ('safe ' => 1 ));
463464 break ;
465+
466+ case 'url ' :
467+ if (!StringUtils::strValidCharacters ($ value , 'url ' )) {
468+ $ errorMessage = $ gL10n ->get ('SYS_INVALID_PAGE_VIEW ' );
469+ }
470+ break ;
464471 }
465472
466473 // wurde kein Fehler entdeckt, dann den Inhalt der Variablen zurueckgeben
0 commit comments