|
|
@@ -98,6 +98,7 @@ Crowi.escape = function(s) {
|
|
|
s = s.replace(/&/g, '&')
|
|
|
.replace(/</g, '<')
|
|
|
.replace(/>/g, '>')
|
|
|
+ .replace(/'/g, ''')
|
|
|
.replace(/"/g, '"')
|
|
|
;
|
|
|
return s;
|
|
|
@@ -107,6 +108,7 @@ Crowi.unescape = function(s) {
|
|
|
.replace(/&/g, '&')
|
|
|
.replace(/</g, '<')
|
|
|
.replace(/>/g, '>')
|
|
|
+ .replace(/'/g, '\'')
|
|
|
.replace(/"/g, '"')
|
|
|
;
|
|
|
return s;
|
|
|
@@ -126,10 +128,12 @@ Crowi.rendererType.markdown.prototype = {
|
|
|
var result;
|
|
|
if (lang) {
|
|
|
result = hljs.highlight(lang, code);
|
|
|
+ return callback(null, result.value);
|
|
|
} else {
|
|
|
- result = hljs.highlightAuto(code);
|
|
|
+ //result = hljs.highlightAuto(code);
|
|
|
+ //callback(null, result.value);
|
|
|
+ return callback(null, code);
|
|
|
}
|
|
|
- callback(null, result.value);
|
|
|
},
|
|
|
tables: true,
|
|
|
breaks: true,
|