From cc9d722cf738da41224c7c803a27c2532da73beb Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Thu, 17 Nov 2011 22:17:48 +0100 Subject: ste:get_translation now escapes HTML. So we do not longer need to write: We can now omit the ste:escape tags. Setting the parameter raw to something non-empty will return the raw translation. --- ratatoeskr/sys/translation.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ratatoeskr/sys') diff --git a/ratatoeskr/sys/translation.php b/ratatoeskr/sys/translation.php index cd40f85..ca43c13 100644 --- a/ratatoeskr/sys/translation.php +++ b/ratatoeskr/sys/translation.php @@ -10,6 +10,7 @@ */ require_once(dirname(__FILE__) . "/models.php"); +require_once(dirname(__FILE__) . "/utils.php"); require_once(dirname(__FILE__) . "/init_ste.php"); if(!defined(TRANSLATION_PLUGIN_LOADED)) @@ -21,7 +22,8 @@ if(!defined(TRANSLATION_PLUGIN_LOADED)) global $translation; if((!isset($translation)) or empty($params["for"]) or (!isset($translation[$params["for"]]))) return ""; - return $translation[$params["for"]]; + $rv = $translation[$params["for"]]; + return (!empty($params["raw"])) ? $rv : htmlesc($rv); } ); define(TRANSLATION_PLUGIN_LOADED, True); -- cgit v1.2.3-70-g09d2