Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
properly escape seperators
Browse files Browse the repository at this point in the history
  • Loading branch information
Niharika Khanna committed Aug 14, 2017
1 parent cac9076 commit 1c53af5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/reactrender.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ exports.render = function(req, res, page) {
if (!page.noBrowserJavascript) {
// FIXME: we should just inline the addReactScripts functionality in this function:
let script = `\
window.initialModel = ${JSON.stringify(jsonModel)};
window.initialModel = ${JSON.stringify(jsonModel).replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029')};
window.initialModelLaunched = false;
if (window.controller) {
window.controller.launch(window.initialModel);
Expand Down

0 comments on commit 1c53af5

Please sign in to comment.