From 8e08e0d5ac4ca34aeb7ad2aa945a263c7cc9927f Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Wed, 1 Feb 2017 08:28:24 -0500 Subject: [PATCH] Fix issue processwire/processwire-issues#163 --- wire/core/LanguageFunctions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wire/core/LanguageFunctions.php b/wire/core/LanguageFunctions.php index 5881dac7..b384f430 100644 --- a/wire/core/LanguageFunctions.php +++ b/wire/core/LanguageFunctions.php @@ -40,12 +40,14 @@ function __($text, $textdomain = null, $context = '') { // common translation $textdomain = 'wire/modules/LanguageSupport/LanguageTranslator.php'; } - $value = htmlspecialchars($language->translator()->getTranslation($textdomain, $text, $context), ENT_QUOTES, 'UTF-8'); + $value = $language->translator()->getTranslation($textdomain, $text, $context); if($value === "=") { $value = $text; } else if($value === "+") { $v = $language->translator()->commonTranslation($text); $value = empty($v) ? $text : $v; + } else { + $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); } return $value; }