页面修改图片路径
前台修改======================
"aTargets": [2],
"mData": null,
"mRender": function (data, type, full) {
var content = full.content;
var s = content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) {
return "<img src='"+capture.substring(1)+"' class='img-responsive'>";
});
return s;
}
后台修改====================----
String content = question.getContent();
String src = CommonUtil.getImgStr(content);
if(StrKit.notBlank(src)){
String newStr = CommonUtil.repairContent(content);
question.setContent(newStr);
}
/**