//去除html标签获取纯文本
function contentFormat(content) {
return typeof content == 'string' ? content.replace(/<[^>]+>/g, "") : " ";
};
template.defaults.imports.contentFormat = contentFormat;
//使用
{{item.content|contentFormat}}
//去除html标签获取纯文本
function contentFormat(content) {
return typeof content == 'string' ? content.replace(/<[^>]+>/g, "") : " ";
};
template.defaults.imports.contentFormat = contentFormat;
//使用
{{item.content|contentFormat}}