Skip to content
Snippets Groups Projects
Commit 0158da81 authored by Benni Mack's avatar Benni Mack Committed by Oliver Bartsch
Browse files

[BUGFIX] Allow to include YouTube shorts

Kudos to Georg Ringer for the hint.

Resolves: #98600
Releases: main, 12.4, 11.5
Change-Id: I1c200b4a8835bdccc4e9dc2cf2cee423459a13c4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79747


Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
parent 43e6b93c
Branches
Tags
No related merge requests found
......@@ -83,7 +83,8 @@ class YouTubeHelper extends AbstractOEmbedHelper
// - www.youtube.com/v/<code>
// - www.youtube-nocookie.com/v/<code> # youtube-nocookie.com web link
// - www.youtube.com/embed/<code> # URL form iframe embed code, can also get code from full iframe snippet
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) {
// - www.youtube.com/shorts/<code>
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?|shorts)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) {
$videoId = $match[1];
}
if (empty($videoId)) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment