Increase video tag regular expression specificity to decrease backtrack in BBCode::convert
This commit is contained in:
parent
e8929efbea
commit
e1f8e10fe7
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);
|
//$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
|
// 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) {
|
if ($try_oembed) {
|
||||||
// html5 video and audio
|
// html5 video and audio
|
||||||
|
|
Loading…
Reference in a new issue