mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
b81e3c2f68
commit
2c6bae2e63
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue