url_sanitise youtube urls (cut off ")"/">")

This commit is contained in:
jesopo 2019-09-03 12:05:22 +01:00
parent 24a510d1ca
commit 219382cc3c

View file

@ -158,7 +158,8 @@ class Module(ModuleManager.BaseModule):
@utils.kwarg("pattern", REGEX_YOUTUBE)
def channel_message(self, event):
if event["target"].get_setting("auto-youtube", False):
out = self._from_url(event["match"].group(0))
url = utils.http.url_sanitise(event["match"].group(0))
out = self._from_url(url)
if not out == None:
event.eat()
event["stdout"].write(out)