mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix middleware/utf8.js file bug
This commit is contained in:
+1
-1
@@ -2,5 +2,5 @@
|
||||
// https://stackoverflow.com/questions/1497885/remove-control-characters-from-php-string/1497928#1497928
|
||||
module.exports = async (ctx, next) => {
|
||||
await next();
|
||||
ctx.body = ctx.body.replace(/[\x00-\x1F\x7F]/g, '');
|
||||
ctx.body = ctx.body?ctx.body.replace(/[\x00-\x1F\x7F]/g, ''):ctx.body;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user