From eb0a4127d49f5cfa38396d4637a5a6ca7da0f3ff Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Thu, 18 Feb 2016 19:26:00 +0800 Subject: [PATCH] MDL-52068 repository: Prevent JS errors due to unescaped lang strings --- repository/repository_callback.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/repository/repository_callback.php b/repository/repository_callback.php index da8b9416374..b657d29373e 100644 --- a/repository/repository_callback.php +++ b/repository/repository_callback.php @@ -67,17 +67,21 @@ $repo->callback(); // If Moodle is working on HTTPS mode, then we are not allowed to access // parent window, in this case, we need to alert user to refresh the repository // manually. -$strhttpsbug = get_string('cannotaccessparentwin', 'repository'); +$strhttpsbug = json_encode(get_string('cannotaccessparentwin', 'repository')); $strrefreshnonjs = get_string('refreshnonjsfilepicker', 'repository'); $js =<<