Merge pull request #10042 from MrPetovan/bug/10041-video-regex-backtrack
Increase video tag regular expression specificity to decrease backtrack in BBCode::convert
This commit is contained in:
commit
751bf7ae30
1 changed files with 1 additions and 1 deletions
|
@ -1612,7 +1612,7 @@ class BBCode
|
|||
//$Text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism", '<br><img src="' .DI::baseUrl() . '/images/lock_icon.gif" alt="' . DI::l10n()->t('Encrypted content') . '" title="' . '$1' . ' ' . DI::l10n()->t('Encrypted content') . '" /><br>', $Text);
|
||||
|
||||
// Simplify "video" element
|
||||
$text = preg_replace('(\[video.*?\ssrc\s?=\s?([^\s\]]+).*?\].*?\[/video\])ism', '[video]$1[/video]', $text);
|
||||
$text = preg_replace('(\[video[^\]]*?\ssrc\s?=\s?([^\s\]]+)[^\]]*?\].*?\[/video\])ism', '[video]$1[/video]', $text);
|
||||
|
||||
if ($try_oembed) {
|
||||
// html5 video and audio
|
||||
|
|
Loading…
Reference in a new issue