KindEditor 4.1.11:
kindeditor-all.js 文件
第772行:
var re = /(s*)<(/)?([w-:]+)((?:s+|(?:s+[w-:]+)|(?:s+[w-:]+=[^s"'<>]+)|(?:s+[w-:"]+="[^"]*")|(?:s+[w-:"]+='[^']*'))*)(/)?>(s*)/g;
改为:
var re = /([ f
v]*)<(/)?([w-:]+)((?:s+|(?:s+[w-:]+)|(?:s+[w-:]+=[^s"'<>]+)|(?:s+[w-:"]+="[^"]*")|(?:s+[w-:"]+='[^']*'))*)(/)?>([ f
v]*)/g;
KindEditor 4.1.10:
kindeditor.js 文件
第754行:
var re = /(s*)<(/)?([w-:]+)((?:s+|(?:s+[w-:]+)|(?:s+[w-:]+=[^s"'<>]+)|(?:s+[w-:"]+="[^"]*")|(?:s+[w-:"]+='[^']*'))*)(/)?>(s*)/g;
改为:
var re = /([ f
v]*)<(/)?([w-:]+)((?:s+|(?:s+[w-:]+)|(?:s+[w-:]+=[^s"'<>]+)|(?:s+[w-:"]+="[^"]*")|(?:s+[w-:"]+='[^']*'))*)(/)?>([ f
v]*)/g;
其实就是把第一个和最后一个 s 替换成 [ f v]
来源:http://www.lingchenliang.com/post/97.html