Skip to content

Commit

Permalink
Update write-js.php (#1400)
Browse files Browse the repository at this point in the history
Add 'allow-same-origin' into sandbox's attrs to fix that the article preview page does not match the real page.
  • Loading branch information
Valpha committed Apr 15, 2022
1 parent 3512fd4 commit 9fd0252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/write-js.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ function previewData(cid) {

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 () {
Expand Down

0 comments on commit 9fd0252

Please sign in to comment.