mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-10 19:04:42 +02:00
Fix
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user