[refs #616] ugly replaces
This commit is contained in:
parent
1dcce7bf92
commit
378fe5847e
|
@ -83,6 +83,6 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
$('.md_and_cm code').each(function (code) {
|
||||
CodeMirror.runMode(this.innerHTML.replace(/&/gi, '&'), this.className, this);
|
||||
CodeMirror.runMode(this.innerHTML.replace(/&/gi, '&').replace(/</gi, '<').replace(/>/gi, '>'), this.className, this);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ $(document).ready(function() {
|
|||
var cancel_button = form.find('.cancel_edit_comment.button');
|
||||
cancel_button.click();
|
||||
$('.buttons a.edit_comment#'+cancel_button.attr('id')).parent().parent().find('.cm-s-default.md_and_cm').html(data).find('code').each(function (code) {
|
||||
CodeMirror.runMode(this.innerHTML.replace(/&/gi, '&'), this.className, this);
|
||||
CodeMirror.runMode(this.innerHTML.replace(/&/gi, '&').replace(/</gi, '<').replace(/>/gi, '>'), this.className, this);
|
||||
});
|
||||
},
|
||||
error: function(data){
|
||||
|
|
|
@ -16,7 +16,7 @@ $(document).ready(function() {
|
|||
data: el_dup.serialize(),
|
||||
success: function(data){
|
||||
preview.html(data).find('code').each(function (code) {
|
||||
CodeMirror.runMode(this.innerHTML.replace(/&/gi, '&'), this.className, this);
|
||||
CodeMirror.runMode(this.innerHTML.replace(/&/gi, '&').replace(/</gi, '<').replace(/>/gi, '>'), this.className, this);
|
||||
});
|
||||
},
|
||||
error: function(data){
|
||||
|
|
Loading…
Reference in New Issue