1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-24 09:30:34 +01:00

Merge pull request #5002 from JoshyPHP/ticket/15408

[ticket/15408] Reject duplicate BBCodes in ACP
This commit is contained in:
Marc Alexander 2017-11-05 11:06:15 +01:00
commit 44d5bde616
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -553,10 +553,10 @@ class acp_bbcodes
}
// Lowercase tags
$bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+=?).*/i', '$1', $bbcode_match);
$bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+)=?.*/i', '$1', $bbcode_match);
$bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match);
$bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match);
if (!preg_match('/^[a-zA-Z0-9_-]+=?$/', $bbcode_tag))
if (!preg_match('/^[a-zA-Z0-9_-]+$/', $bbcode_tag))
{
global $user;
trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);