From 121f8b8d084ca21d6fd3a186cc8d9bee13a6852e Mon Sep 17 00:00:00 2001 From: Shiquan Sun Date: Mon, 9 Jan 2017 16:26:38 +0800 Subject: [PATCH] filter out control characters, fix #1 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bd5de68..7c23d4c 100644 --- a/index.js +++ b/index.js @@ -155,7 +155,7 @@ function *genFeed() { }) this.set('Content-Type', 'application/xml; charset=utf-8') - this.body = feed.xml() + this.body = feed.xml().replace(/[\u0000-\u0008\u0011-\u001F\u007F\u0080-\u009F]/g, '�') } function *genFeedFromPage() {