Skip to content

Commit 47a3fa8

Browse files
brigandtimdorr
authored andcommitted
fixes xss vulnerability in universal example, #1855 (#1856)
1 parent 4c5f911 commit 47a3fa8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/universal/server/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function renderFullPage(html, preloadedState) {
6666
<body>
6767
<div id="app">${html}</div>
6868
<script>
69-
window.__PRELOADED_STATE__ = ${JSON.stringify(preloadedState)}
69+
window.__PRELOADED_STATE__ = ${JSON.stringify(preloadedState).replace(/</g, '\\x3c')}
7070
</script>
7171
<script src="/static/bundle.js"></script>
7272
</body>

0 commit comments

Comments
 (0)