From d8cafc8fd86f6345a54f4a2c371df952c3945b4e Mon Sep 17 00:00:00 2001 From: Zankaria Date: Wed, 12 Feb 2025 20:13:41 +0100 Subject: [PATCH] config.php: better youtube embedding regex --- inc/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/config.php b/inc/config.php index 62a02c45..def2cd27 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1196,7 +1196,7 @@ // It's very important that you match the entire input (with ^ and $) or things will not work correctly. $config['embedding'] = array( [ - '/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9\-_]{10,11})(&.+)?$/i', + '/^(?:(?:https?:)?\/\/)?((?:www|m)\.)?(?:(?:youtube(?:-nocookie)?\.com|youtu\.be))(?:\/(?:[\w\-]+\?v=|embed\/|live\/|v\/)?)([\w\-]{11})((?:\?|\&)\S+)?$/i', '