From 4539eb69aa5f2bea3dde61687c08164062cba767 Mon Sep 17 00:00:00 2001 From: Tone <66808319+Tone866@users.noreply.github.com> Date: Thu, 4 Jul 2024 20:53:49 +0200 Subject: [PATCH] [GolemBridge] fix youtube links (#4144) --- bridges/GolemBridge.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/GolemBridge.php b/bridges/GolemBridge.php index b52d3c2f..7f59ee90 100644 --- a/bridges/GolemBridge.php +++ b/bridges/GolemBridge.php @@ -109,10 +109,10 @@ class GolemBridge extends FeedExpander //built youtube iframes foreach ($article->find('.embedcontent') as &$embedcontent) { $ytscript = $embedcontent->find('script', 0); - if (preg_match('/www.youtube.com.*?\"/', $ytscript->innertext, $link)) { - $link = 'https://' . str_replace('\\', '', $link[0]); + if (preg_match('/(www.youtube.com.*?)\"/', $ytscript->innertext, $link)) { + $link = 'https://' . str_replace('\\', '', $link[1]); $embedcontent->innertext .= <<'; EOT;