diff --git a/application/helpers/hlp_common_helper.php b/application/helpers/hlp_common_helper.php index a7eda8827..7b937d73d 100644 --- a/application/helpers/hlp_common_helper.php +++ b/application/helpers/hlp_common_helper.php @@ -314,32 +314,40 @@ function sanitizeProblemChars($str) $enc = 'UTF-8'; $acentos = array( - 'A' => '/À|Á|Â|Ã|Å/', + 'A' => '/À|Á|Â|Ã|Å|Ă|Ǎ/', 'Ae' => '/Ä/', - 'a' => '/à|á|â|ã|å/', - 'ae'=> '/ä/', - 'C' => '/Ç/', - 'c' => '/ç/', + 'a' => '/à|á|â|ã|å|ă|ǎ/', + 'ae' => '/ä/', + 'C' => '/Ç|Č/', + 'c' => '/ç|č/', 'E' => '/È|É|Ê|Ë/', 'e' => '/è|é|ê|ë/', - 'I' => '/Ì|Í|Î|Ï/', - 'i' => '/ì|í|î|ï/', - 'N' => '/Ñ/', + 'I' => '/Ì|Í|Î|Ï|Ǐ/', + 'i' => '/ì|í|î|ï|ǐ/', + 'N' => '/Ñ|Ň|ň/', 'n' => '/ñ/', - 'O' => '/Ò|Ó|Ô|Õ/', + 'O' => '/Ò|Ó|Ô|Õ|Ǒ/', 'Oe' => '/Ö/', - 'o' => '/ò|ó|ô|õ/', + 'o' => '/ò|ó|ô|õ|ǒ/', 'oe' => '/ö/', - 'U' => '/Ù|Ú|Û/', + 'R' => '/Ř/', + 'r' => '/ř/', + 'S' => '/Š/', + 's' => '/š/', + 'T' => '/Ť/', + 't' => '/ť/', + 'U' => '/Ù|Ú|Û|Ŭ|Ǔ/', 'Ue' => '/Ü/', - 'u' => '/ù|ú|û/', + 'u' => '/ù|ú|û|ŭ|ǔ/', 'ue' => '/ü/', 'Y' => '/Ý/', 'y' => '/ý|ÿ/', + 'Z' => '/Ž/', + 'z' => '/ž/', 'a.' => '/ª/', 'o.' => '/º/', 'ss' => '/ß/' ); - return preg_replace($acentos, array_keys($acentos), htmlentities($str,ENT_NOQUOTES, $enc)); + return preg_replace($acentos, array_keys($acentos), htmlentities($str, ENT_NOQUOTES | ENT_HTML5, $enc)); } diff --git a/content/functions.js.php b/content/functions.js.php index 55eed5414..9b75718d1 100644 --- a/content/functions.js.php +++ b/content/functions.js.php @@ -419,3 +419,17 @@ function setVariable(variable, wert) return true; } } + +// **** +// * Validierung Alias auf Sonderzeichen (analog zu checkWunschUid erlaubt) +// **** +function checkAlias(alias) +{ + + if (/^[a-z0-9 . _ -]*$/i.test(alias) === false) + { + return false; + } + else + return true; +} diff --git a/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php b/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php index 1cc8fb34e..c99a35c27 100644 --- a/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php +++ b/content/mitarbeiter/mitarbeiterdetailoverlay.xul.php @@ -269,7 +269,7 @@ echo '';