From 80fec3c2f49dd6e08c45297926fcdf1a3aa820fb Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Thu, 12 Dec 2019 09:00:03 +0000 Subject: [PATCH] refactor(feed): replace encodeURI with encodeURL --- themes/chameleon/scripts/feed/generator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/chameleon/scripts/feed/generator.js b/themes/chameleon/scripts/feed/generator.js index cf73997..dd8d5d1 100644 --- a/themes/chameleon/scripts/feed/generator.js +++ b/themes/chameleon/scripts/feed/generator.js @@ -5,9 +5,10 @@ const env = new nunjucks.Environment() const { join } = require('path') const { readFileSync } = require('fs') const moment = require('moment') +const { encodeURL } = require('hexo-util') env.addFilter('uriencode', str => { - return encodeURI(str) + return encodeURL(str) }) env.addFilter('noControlChars', str => {