From 4031da07d219267b72046e7c08111e411355882b Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Wed, 3 May 2023 10:28:53 -0300 Subject: [PATCH] https://github.com/WWBN/AVideo/issues/7973 --- Dockerfile | 2 +- objects/functions.php | 6 +++++- objects/video.php | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index adc8ffcea8..0685392fe5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -119,7 +119,7 @@ RUN a2enmod xsendfile rewrite expires headers ssl RUN pip3 install youtube-dl --upgrade youtube-dl # Video Transcription for the SubtitleSwitcher Plugin -RUN pip3 vosk +RUN pip3 install vosk # Copy configuration files COPY deploy/apache/avideo.conf /etc/apache2/sites-available/avideo.conf diff --git a/objects/functions.php b/objects/functions.php index d785f4aae8..73300dc339 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -804,10 +804,14 @@ function sendEmailToSiteOwner($subject, $message) { } } +function fixURL($url){ + return str_replace(array('&%3B', '&'), array('&', '&'), $url); +} + function parseVideos($videoString = null, $autoplay = 0, $loop = 0, $mute = 0, $showinfo = 0, $controls = 1, $time = 0, $objectFit = "") { global $global; if(!empty($videoString)){ - $videoString = str_replace(array('&%3B'), array('&'), $videoString); + $videoString = fixURL($videoString); } //_error_log("parseVideos: $videoString"); if (strpos($videoString, 'youtube.com/embed') !== false) { diff --git a/objects/video.php b/objects/video.php index 62254dcf91..7623c03978 100644 --- a/objects/video.php +++ b/objects/video.php @@ -3716,7 +3716,7 @@ if (!class_exists('Video')) { public function setVideoLink($videoLink) { AVideoPlugin::onVideoSetVideoLink($this->id, $this->videoLink, $videoLink); - $this->videoLink = $videoLink; + $this->videoLink = fixURL($videoLink); } public function getCan_download()