Don't parse youtube channel/user/etc. links as music videos
parent
10c3c632f5
commit
89f414e65c
|
@ -57,6 +57,7 @@ function preprocessMessage(message: string, settings: BBCodeRenderOptions) : str
|
||||||
{
|
{
|
||||||
const result = raw_url.match(youtubeUrlRegex);
|
const result = raw_url.match(youtubeUrlRegex);
|
||||||
if(!result) break single_url_yt;
|
if(!result) break single_url_yt;
|
||||||
|
if(result[5]?.length < 11) break single_url_yt;
|
||||||
|
|
||||||
return "[yt]https://www.youtube.com/watch?v=" + result[5] + "[/yt]";
|
return "[yt]https://www.youtube.com/watch?v=" + result[5] + "[/yt]";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue