From 07db7540ff84da6ed0fa45e78862b4eeafb2631f Mon Sep 17 00:00:00 2001 From: maxpozdeev Date: Tue, 6 Sep 2022 21:35:36 +0300 Subject: [PATCH] fix for prev commit --- src/init.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/init.php b/src/init.php index fd2f526..6016961 100644 --- a/src/init.php +++ b/src/init.php @@ -233,14 +233,15 @@ function formatTime($format, $timestamp=0) : string return $s; } -function _e($s) +function _e(string $s) { - echo htmlspecialchars(Lang::instance()->get($s)); + echo __($s, true); } -function __($s) +function __(string $s, bool $escape = false) { - return Lang::instance()->get($s); + $v = Lang::instance()->get($s); + return $escape ? htmlspecialchars($v) : $v; } function mttinfo($v)