提交 cc51b6b5 编写于 作者: Y Yasuhiro Fujii 提交者: Brian Anderson

fix escape

上级 016875b1
......@@ -60,9 +60,10 @@ while ((line = lines[cur++]) != null) {
var html = '<pre class="cm-s-default">', curstr = "", curstyle = null;
function add(str, style) {
if (style != curstyle) {
if (curstyle) html += '<span class="cm-' + curstyle + '">' + curstr
+ "</span>";
else if (curstr) html += curstr;
if (curstyle) html +=
'<span class="cm-' + CodeMirror.htmlEscape(curstyle) + '">' +
CodeMirror.htmlEscape(curstr) + "</span>";
else if (curstr) html += CodeMirror.htmlEscape(curstr);
curstr = str; curstyle = style;
} else curstr += str;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册