Skip to content

Commit

Permalink
Add escapejs filter to diff template
Browse files Browse the repository at this point in the history
  • Loading branch information
miaow2 committed Jun 30, 2024
1 parent 0980a05 commit 72e603f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h5 class="card-header">Diff</h5>
stickyFileHeaders: false,
drawFileList: false,
};
const jsonDiff = `{{ instance.diff|safe }}`;
const jsonDiff = `{{ instance.diff|escapejs|safe }}`;
var targetElement = document.getElementById('diffElement');
var diff2htmlUi = new Diff2HtmlUI(targetElement, jsonDiff, configuration);
diff2htmlUi.draw();
Expand Down

0 comments on commit 72e603f

Please sign in to comment.