mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
* feat: add prettier and commit hooks * style(*): prettier format * fix(eslint): parsing error: Unexpected token ... * style(eslint): eslint --fix * style(bilibili): fix `no-undef` and `no-unused-vars` * style(jiandan): fix eqeqeq * style(pixiv): disable `no-constant-condition` rule for eslint * fix(pixiv): use template string * style(toutiao): remove unused variables * style(weibo): use `forEach` instead of `map` The array has no return value, you should use `forEach` instead of `map` * chore(hooks): add eslint hooks * chore(hooks): switch from husky to yorkie * style(zhihu): prettier format * style(docs): fix vuepress custom container https://vuepress.vuejs.org/guide/markdown.html#custom-containers * chore(prettier): set a more reasonable `printWidth` value * style(*): better prettier format
7 lines
384 B
JavaScript
7 lines
384 B
JavaScript
// https://stackoverflow.com/questions/2507608/error-input-is-not-proper-utf-8-indicate-encoding-using-phps-simplexml-lo/40552083#40552083
|
|
// https://stackoverflow.com/questions/1497885/remove-control-characters-from-php-string/1497928#1497928
|
|
module.exports = async (ctx, next) => {
|
|
await next();
|
|
ctx.body = ctx.body ? ctx.body.replace(/[\x00-\x1F\x7F]/g, '') : ctx.body;
|
|
};
|