diff --git a/app/Utils.inc b/app/Utils.inc index 1e3527c1..76ccc7fe 100644 --- a/app/Utils.inc +++ b/app/Utils.inc @@ -19,6 +19,33 @@ */ class Utils { + + + /** + * Mask HTML-chars for save output. + * + * @static + * @param string $string String to be masked + * @return string Masked string + */ + static function t($string) + { + return nl2br(htmlspecialchars($string)); + } + + + /** + * ‚htmlspecialchars‘ with support for UTF-8. + * + * @static + * @param string $string String to be masked + * @return string Masked string + */ + public static function htmlspecialchars_utf8($string) + { + return htmlspecialchars($string, ENT_COMPAT, 'UTF-8'); + } + } ?> diff --git a/views/html/questgroups/questgroup.tpl b/views/html/questgroups/questgroup.tpl index b78d1fe4..5699bfa7 100644 --- a/views/html/questgroups/questgroup.tpl +++ b/views/html/questgroups/questgroup.tpl @@ -6,7 +6,7 @@

:

-

+

diff --git a/views/html/quests/quest.tpl b/views/html/quests/quest.tpl index afccd176..9a8b7376 100644 --- a/views/html/quests/quest.tpl +++ b/views/html/quests/quest.tpl @@ -10,7 +10,7 @@

-

+