From 54277e62fca2a2cdab824e4b5ac761287eae3c9f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 4 Jun 2015 12:23:14 -0400 Subject: [PATCH] fixed #3213 --- src/middleware/middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 956963f76d..b1dd141c3c 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -274,7 +274,7 @@ middleware.renderHeader = function(req, res, callback) { templateValues.linkTags = results.tags.link; templateValues.isAdmin = results.user.isAdmin; templateValues.user = results.user; - templateValues.userJSON = JSON.stringify(results.user); + templateValues.userJSON = JSON.stringify(results.user).replace(/'/g, "\\'"); templateValues.customCSS = results.customCSS; templateValues.customJS = results.customJS; templateValues.maintenanceHeader = parseInt(meta.config.maintenanceMode, 10) === 1 && !results.isAdmin;