also url_sanitise youtube urls found with argless !yt commands

This commit is contained in:
jesopo 2019-09-03 12:07:27 +01:00
parent 219382cc3c
commit 50742d336c

View file

@ -124,7 +124,7 @@ class Module(ModuleManager.BaseModule):
search = event["args"]
else:
url = event["target"].buffer.find(REGEX_YOUTUBE)
url = url.match if url else None
url = utils.http.url_sanitise(url.match) if url else None
if not url:
safe_setting = event["target"].get_setting("youtube-safesearch", True)