Skip to content

Commit

Permalink
fixed local-search xml illegal character
Browse files Browse the repository at this point in the history
  • Loading branch information
codefine committed Nov 23, 2017
1 parent 827672f commit 9974354
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ hexo.extend.filter.register('before_post_render', data => {
const title = (attrs[1] && attrs[1].replace(/\"|\'/g, '')) || '';
return `{% image ${attrs[0]} '${alt}' '${title}' %}`
})
})
});

//删除xml的非法字符\x08
data.content = data.content.replace(/\x08/g, "");
return data;
});

0 comments on commit 9974354

Please sign in to comment.