Update write-js.php (#1400)

Add 'allow-same-origin' into sandbox's attrs to fix that the article preview page does not match the real page.
This commit is contained in:
Valpha
2022-04-15 13:50:13 +08:00
committed by GitHub
parent 3512fd41bf
commit 9fd02529b1

View File

@@ -281,7 +281,7 @@ $(document).ready(function() {
var frame = $('<iframe frameborder="0" class="preview-frame preview-loading"></iframe>')
.attr('src', './preview.php?cid=' + cid)
.attr('sandbox', 'allow-scripts')
.attr('sandbox', 'allow-same-origin allow-scripts')
.appendTo(document.body);
frame.load(function () {