1
0
mirror of https://github.com/flarum/core.git synced 2025-08-02 14:37:49 +02:00

Fix post contentHtml sometimes breaking script parsing

<\/script> tags in post content would sometimes be recognized as
actually ending the script tag, even when escaped (not exactly sure
why). This is fixed by encoding the < > characters in unicode.
This commit is contained in:
Toby Zerner
2017-10-05 11:48:10 +10:30
parent 19d15d4302
commit ea4d889b76

View File

@@ -49,7 +49,7 @@
if (module.default) module.default(app); if (module.default) module.default(app);
} }
app.boot({!! json_encode($payload) !!}); app.boot({!! json_encode($payload, JSON_HEX_TAG) !!});
@if (! $debug) @if (! $debug)
} catch (e) { } catch (e) {
window.location += (window.location.search ? '&' : '?') + 'nojs=1'; window.location += (window.location.search ? '&' : '?') + 'nojs=1';