From 408eb259f4a3534b73c39fa5b3caef5f174c2356 Mon Sep 17 00:00:00 2001 From: teddit Date: Fri, 22 Jan 2021 18:23:38 +0100 Subject: [PATCH] fix unescape's regex, put dot inside character class. fixes #128 --- inc/commons.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/commons.js b/inc/commons.js index 3e88ece..d24f241 100644 --- a/inc/commons.js +++ b/inc/commons.js @@ -152,7 +152,7 @@ module.exports = function(request, fs) { let str = s.replace(re, (m) => { return unescaped[m] }) - let r = new RegExp('((www|old)\.)?reddit.com', 'g') + let r = new RegExp('((www|old)\.)?reddit[.]com', 'g') let result = str.replace(r, config.domain) return result } else {