mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-04 00:24:29 +08:00
修复编辑器html注释注入
This commit is contained in:
@@ -120,7 +120,7 @@
|
|||||||
<div id="editor" style="height: 600px;">
|
<div id="editor" style="height: 600px;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="content" style="display: none;">{:json_encode($post->content)}</div>
|
<div id="content" style="display: none;">{:base64_encode(json_encode($post->content))}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -298,9 +298,8 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(JSON.parse($('#content').text()));
|
|
||||||
|
|
||||||
quill.setContents(JSON.parse($('#content').text()))
|
quill.setContents(JSON.parse(window.atob($('#content').text())))
|
||||||
|
|
||||||
quill.on('selection-change', function (range, oldRange, source) {
|
quill.on('selection-change', function (range, oldRange, source) {
|
||||||
if (range) {
|
if (range) {
|
||||||
|
|||||||
Reference in New Issue
Block a user