add HTML entity encoding to PHP translation logic, remove exception to allow <br/> tags in DOMpurify by eliminating the single case that made use of it
This commit is contained in:
parent
79d30c9410
commit
d3082c36d7
14 changed files with 33 additions and 24 deletions
|
@ -31,8 +31,8 @@
|
||||||
"Falscher Lösch-Code. Text wurde nicht gelöscht.",
|
"Falscher Lösch-Code. Text wurde nicht gelöscht.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Text wurde erfolgreich gelöscht.",
|
"Text wurde erfolgreich gelöscht.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"JavaScript ist eine Voraussetzung, um %s zu nutzen.<br />Bitte entschuldige die Unannehmlichkeiten.",
|
"JavaScript ist eine Voraussetzung, um %s zu nutzen. Bitte entschuldige die Unannehmlichkeiten.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s setzt einen modernen Browser voraus, um funktionieren zu können.",
|
"%s setzt einen modernen Browser voraus, um funktionieren zu können.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"Token de eliminación erróneo. El texto no fue eliminado.",
|
"Token de eliminación erróneo. El texto no fue eliminado.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"El texto se ha eliminado correctamente.",
|
"El texto se ha eliminado correctamente.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"JavaScript es necesario para que %s funcione.<br />Sentimos los inconvenientes ocasionados.",
|
"JavaScript es necesario para que %s funcione. Sentimos los inconvenientes ocasionados.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s requiere un navegador moderno para funcionar.",
|
"%s requiere un navegador moderno para funcionar.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"Jeton de suppression incorrect. Le paste n'a pas été supprimé.",
|
"Jeton de suppression incorrect. Le paste n'a pas été supprimé.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Le paste a été correctement supprimé.",
|
"Le paste a été correctement supprimé.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"JavaScript est requis pour faire fonctionner %s. <br />Désolé pour cet inconvénient.",
|
"JavaScript est requis pour faire fonctionner %s. Désolé pour cet inconvénient.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s nécessite un navigateur moderne pour fonctionner.",
|
"%s nécessite un navigateur moderne pour fonctionner.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"Hibás törlési azonosító. A bejegyzés nem lett törölve.",
|
"Hibás törlési azonosító. A bejegyzés nem lett törölve.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"A bejegyzés sikeresen törölve.",
|
"A bejegyzés sikeresen törölve.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"JavaScript szükséges a %s működéséhez. Elnézést a fennakadásért.",
|
"JavaScript szükséges a %s működéséhez. Elnézést a fennakadásért.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"A %s működéséhez a jelenleginél újabb böngészőre van szükség.",
|
"A %s működéséhez a jelenleginél újabb böngészőre van szükség.",
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"Codice cancellazione errato. Il messaggio NON è stato cancellato.",
|
"Codice cancellazione errato. Il messaggio NON è stato cancellato.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Il messaggio è stato correttamente cancellato.",
|
"Il messaggio è stato correttamente cancellato.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"%s funziona solo con JavaScript attivo.<br />Ci dispiace per l'inconveniente.",
|
"%s funziona solo con JavaScript attivo. Ci dispiace per l'inconveniente.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s richiede un browser moderno e aggiornato per funzionare.",
|
"%s richiede un browser moderno e aggiornato per funzionare.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"Foutieve verwijdercode. Geplakte tekst is niet verwijderd.",
|
"Foutieve verwijdercode. Geplakte tekst is niet verwijderd.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Geplakte tekst is correct verwijderd.",
|
"Geplakte tekst is correct verwijderd.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"JavaScript vereist om %s te laten werken.<br />Sorry voor het ongemak.",
|
"JavaScript vereist om %s te laten werken. Sorry voor het ongemak.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s vereist een moderne browser om te kunnen werken ",
|
"%s vereist een moderne browser om te kunnen werken ",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"Feil slettingsnøkkel. Innlegg ble ikke fjernet.",
|
"Feil slettingsnøkkel. Innlegg ble ikke fjernet.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Innlegget er slettet.",
|
"Innlegget er slettet.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"Javascript kreves for at %s skal fungere<br />Beklager.",
|
"Javascript kreves for at %s skal fungere. Beklager.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s krever en moderne nettleser for å fungere.",
|
"%s krever en moderne nettleser for å fungere.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"Geton de supression incorrècte. Lo tèxte es pas estat suprimit.",
|
"Geton de supression incorrècte. Lo tèxte es pas estat suprimit.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Lo tèxte es estat correctament suprimit.",
|
"Lo tèxte es estat correctament suprimit.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"JavaScript es requesit per far foncionar %s. <br />O planhèm per l’inconvenient.",
|
"JavaScript es requesit per far foncionar %s. O planhèm per l’inconvenient.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s necessita un navigator modèrn per foncionar.",
|
"%s necessita un navigator modèrn per foncionar.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"Nieprawidłowy token usuwania. Wklejka nie została usunięta.",
|
"Nieprawidłowy token usuwania. Wklejka nie została usunięta.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Wklejka usunięta poprawnie.",
|
"Wklejka usunięta poprawnie.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"Do działania %sa jest wymagany JavaScript. Przepraszamy za tę niedogodność.",
|
"Do działania %sa jest wymagany JavaScript. Przepraszamy za tę niedogodność.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s wymaga do działania nowoczesnej przeglądarki.",
|
"%s wymaga do działania nowoczesnej przeglądarki.",
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"Token de remoção inválido. A cópia não foi excluída.",
|
"Token de remoção inválido. A cópia não foi excluída.",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"A cópia foi devidamente excluída.",
|
"A cópia foi devidamente excluída.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"JavaScript é necessário para que %s funcione.<br />Pedimos desculpas pela inconveniência.",
|
"JavaScript é necessário para que %s funcione. Pedimos desculpas pela inconveniência.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s requer um navegador moderno para funcionar.",
|
"%s requer um navegador moderno para funcionar.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"Неверный ключ удаления записи. Запись не удалена",
|
"Неверный ключ удаления записи. Запись не удалена",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Запись была успешно удалена.",
|
"Запись была успешно удалена.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"Для работы %s требуется включенный JavaScript.<br />Приносим извинения за неудобства.",
|
"Для работы %s требуется включенный JavaScript. Приносим извинения за неудобства.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"Для работы %s требуется более современный браузер.",
|
"Для работы %s требуется более современный браузер.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"Napačen token za izbris. Prilepek ni bil izbrisan..",
|
"Napačen token za izbris. Prilepek ni bil izbrisan..",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"Prilepek je uspešno izbrisan.",
|
"Prilepek je uspešno izbrisan.",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"Da %s deluje, moraš vklopiti JavaScript.<br />Oprosti za povročene nevšečnosti.",
|
"Da %s deluje, moraš vklopiti JavaScript. Oprosti za povročene nevšečnosti.",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s za svoje delovanje potrebuje moderen brskalnik.",
|
"%s za svoje delovanje potrebuje moderen brskalnik.",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
"错误的删除token,粘贴没有被删除。",
|
"错误的删除token,粘贴没有被删除。",
|
||||||
"Paste was properly deleted.":
|
"Paste was properly deleted.":
|
||||||
"粘贴已被正确删除。",
|
"粘贴已被正确删除。",
|
||||||
"JavaScript is required for %s to work.<br />Sorry for the inconvenience.":
|
"JavaScript is required for %s to work. Sorry for the inconvenience.":
|
||||||
"%s需要JavaScript来进行加解密。<br />带来的不便敬请谅解。",
|
"%s需要JavaScript来进行加解密。 给你带来的不便敬请谅解。",
|
||||||
"%s requires a modern browser to work.":
|
"%s requires a modern browser to work.":
|
||||||
"%s需要工作于现代化的浏览器。",
|
"%s需要工作于现代化的浏览器。",
|
||||||
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
"Still using Internet Explorer? Do yourself a favor, switch to a modern browser:":
|
||||||
|
|
|
@ -125,6 +125,15 @@ class I18n
|
||||||
} else {
|
} else {
|
||||||
$args[0] = self::$_translations[$messageId];
|
$args[0] = self::$_translations[$messageId];
|
||||||
}
|
}
|
||||||
|
// encode any non-integer arguments and the message ID, if it doesn't contain a link
|
||||||
|
$argsCount = count($args);
|
||||||
|
if ($argsCount > 1) {
|
||||||
|
for ($i = 0; $i < $argsCount; ++$i) {
|
||||||
|
if (($i > 0 && !is_int($args[$i])) || strpos($args[0], '<a') === false) {
|
||||||
|
$args[$i] = htmlentities($args[$i], ENT_QUOTES | ENT_XHTML | ENT_DISALLOWED, 'UTF-8');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return call_user_func_array('sprintf', $args);
|
return call_user_func_array('sprintf', $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue