Skip to content

Commit

Permalink
Add back code highlighter fix that got replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
icc committed Jul 20, 2021
1 parent 51bc652 commit fb641b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckeditor/plugins/customCodeHighlighter/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ CKEDITOR.plugins.add('customCodeHighlighter', {
},
highlighter: function (code, language, callback) {
// Here we are highlighting the code and returning it.
callback(code);
/**
* Note: Since we're not adding any highlighting we have to
* encode the html so that the html is not being run.
*/
callback(CKEDITOR.tools.htmlEncode(code));
}
});
editor.plugins.codesnippet.setHighlighter(highlighter);
Expand Down

0 comments on commit fb641b0

Please sign in to comment.