我使用表情符号并尝试重播:
for (smile in emt) {
patterns.push([
new RegExp(smile.replace(/([\(\)\[\]\{\}\.\?\^\$\|\-])/g, "\\$1"), "gi"),
'<img src="'+url+emt[smile]+ '" />'
]);
}
对此:
for (smile in emt) {
patterns.push([
new RegExp(smile.replace(/([\(\)\[\]\{\}\.\?\^\$\|\-])/g, "\\$1"), "gi"),
'<%= image_tag("'+url+emt[smile]+ '") %>' ///here is change
]);
}
但它只将 image_tag 显示为文本 - 为什么