summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2008-07-23 16:36:41 +0200
committerCallan Barrett <wizzomafizzo@gmail.com>2008-07-28 10:58:58 +0200
commit2c6bae2e63c69f87599e5ef081eeba0a8d08bf00 (patch)
treec8bdf2b691e123376fc1f1f570c72954e12cabd9 /web
parentb81e3c2f6814e73973b4d42e66b1d0e58c2943d2 (diff)
downloadaur-2c6bae2e63c69f87599e5ef081eeba0a8d08bf00.tar.gz
aur-2c6bae2e63c69f87599e5ef081eeba0a8d08bf00.tar.xz
Convert special chars in translations to html entities.
This closes FS#10809 - bug in french translation of AUR web interface Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web')
-rw-r--r--web/lib/translator.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/lib/translator.inc b/web/lib/translator.inc
index f16bd11f..fb9ed635 100644
--- a/web/lib/translator.inc
+++ b/web/lib/translator.inc
@@ -25,7 +25,6 @@
include_once("common_po.inc");
-
function __() {
global $_t;
global $LANG;
@@ -49,6 +48,8 @@ function __() {
$translated = "_${tag}_";
}
+ $translated = htmlspecialchars($translated, ENT_QUOTES);
+
# This condition is to reorganise the arguments in case of
# deprecated usage. __("string", array("string","string"))
if (!empty($args[1]) && is_array($args[1])) {
@@ -64,6 +65,7 @@ function __() {
$translated = preg_replace("/\%[sh]/", $args[$i], $translated, 1);
}
}
+
return $translated;
}