From d20710475ea0f65d883e878d1b613c89e568608a Mon Sep 17 00:00:00 2001 From: stefan Date: Fri, 27 Mar 2026 16:09:30 +0100 Subject: [PATCH] Enhance YouTube URL check in embedYoutube function Added check for YouTube shorts URL in embedYoutube function. --- TextformatterVideoEmbed.module | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TextformatterVideoEmbed.module b/TextformatterVideoEmbed.module index 43224d4..6d8c125 100644 --- a/TextformatterVideoEmbed.module +++ b/TextformatterVideoEmbed.module @@ -444,7 +444,8 @@ class TextformatterVideoEmbed extends Textformatter implements ConfigurableModul // perform fast check before performing regex check if(strpos($str, '://www.youtube.com/watch') === false - && strpos($str, '://www.youtube.com/v/') === false + && strpos($str, '://www.youtube.com/v/') === false + && strpos($str, '://youtube.com/shorts/') === false && strpos($str, '://youtu.be/') === false) return; // 1: full URL, 2:video id, 3: query string (optional)