fix unescape's regex, put dot inside character class. fixes #128

This commit is contained in:
teddit 2021-01-22 18:23:38 +01:00
parent 8b4da831ee
commit 408eb259f4
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ module.exports = function(request, fs) {
let str = s.replace(re, (m) => { let str = s.replace(re, (m) => {
return unescaped[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) let result = str.replace(r, config.domain)
return result return result
} else { } else {