dz发帖成功后换行无效丢失兼容解决方法教程
dz发帖成功后换行无效丢失兼容解决方法教程故障解决
找到static/js/bbcode.js
搜索
if((allowhtml && fetchCheckbox('htmlon')) || trim(str) == '') {
for(i in EXTRAFUNC['html2bbcode']) {
EXTRASTR = str;
try {
eval('str = ' + EXTRAFUNC['html2bbcode'] + '()');
} catch(e) {}
}
str = str.replace(/<img[^>]+smilieid=(["']?)(\d+)(\1)[^>]*>/ig, function($1, $2, $3) {return smileycode($3);});
str = str.replace(/<img([^>]*aid=[^>]*)>/ig, function($1, $2) {return imgtag($2);});
return str;
}添加
var divPos = strpos(str,"<div>");
if(divPos > 0 ){
if(divPos > 4 && str.substr(divPos - 4,4) == '</p>'){}
else{
str = str.substr(0,divPos) + '<br>'+ str.substr(divPos);
}
}后台更新缓存,问题解决。
页:
[1]