This commit is contained in:
Dragon Fire
2021-02-28 15:02:01 -05:00
parent 5d31050a45
commit f61df82de7
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -207,6 +207,7 @@ module.exports = class Util {
static stripNSFWURLs(str, siteList, text = '[redacted nsfw url]') {
const uris = str.match(/(https?:\/\/\S+)/g);
if (!uris) return str;
for (const uri of uris) {
const parsed = url.parse(uri);
if (!siteList.some(pornURL => parsed.host === pornURL)) continue;