From 62a54c64f82c0d0667ff6c98fa72271fd87ba394 Mon Sep 17 00:00:00 2001 From: Jay Trees Date: Fri, 25 Mar 2022 14:56:40 +0100 Subject: [PATCH] Fix translation not working --- src/classes/page.php | 2 +- src/functions/gettext.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/classes/page.php b/src/classes/page.php index 3ebd2195..fb4a4ef2 100644 --- a/src/classes/page.php +++ b/src/classes/page.php @@ -262,7 +262,7 @@ class Page toast_wish_create : '', toast_wish_add : '', toast_wish_update : '', - toast_wish_save : '', + toast_wish_save : '', toast_wish_delete : '', toast_clipboard_error_title : '', diff --git a/src/functions/gettext.php b/src/functions/gettext.php index 760ac32b..fe0d949a 100644 --- a/src/functions/gettext.php +++ b/src/functions/gettext.php @@ -16,9 +16,9 @@ function __(string $text) $translation = $translations->find(null, $text); if ($translation) { - return $translation->getTranslation(); + return htmlentities($translation->getTranslation()); } } - return $text; + return htmlentities($text); }