aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index e09c12589..47eed7c7c 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -747,7 +747,7 @@ function get_name_from_file($filename)
* @param string key
* @return string
*/
-function l10n($key)
+function raw_l10n($key)
{
global $lang, $conf;
@@ -758,6 +758,16 @@ function l10n($key)
return isset($lang[$key]) ? $lang[$key] : $key;
}
+/**
+ * Like l10n but converts html entities
+ *
+ * @param string key
+ * @return string
+ */
+function l10n($key)
+{
+ return htmlentities(raw_l10n($key),ENT_QUOTES);
+}
/**
* returns the corresponding value from $themeconf if existing. Else, the