From 35ca0bc247fee53f0b7b4e8789322d4dc41c792e Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 3 Dec 2019 13:05:33 +0100 Subject: [PATCH] Possible solution to avoid issues with JS and apostrophe of other languages strings --- pandora_console/include/functions_io.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index baddb18531..f0e2037cf2 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -455,7 +455,7 @@ function __($string /*, variable arguments */) return $string; } - return $l10n->translate($string); + return str_replace('\'', '`', $l10n->translate($string)); } $args = func_get_args(); @@ -465,7 +465,7 @@ function __($string /*, variable arguments */) return vsprintf($string, $args); } - return vsprintf($l10n->translate($string), $args); + return vsprintf(str_replace('\'', '`', $l10n->translate($string)), $args); }