diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index e21e2fb37f..dd1897ecbd 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -134,6 +134,11 @@ class acp_bbcodes } } + if (!preg_match('#\[' . $data['bbcode_tag'] .'].*?\[/' . $data['bbcode_tag'] . ']#s', $bbcode_match)) + { + trigger_error($user->lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $sql_ary = array( 'bbcode_tag' => $data['bbcode_tag'], 'bbcode_match' => $bbcode_match, diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 5e396fc83c..13dae541ac 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -38,11 +38,12 @@ $lang = array_merge($lang, array( 'BBCODE_ADDED' => 'BBCode added successfully.', 'BBCODE_EDITED' => 'BBCode edited successfully.', - 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.', 'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist.', 'BBCODE_HELPLINE' => 'Helpline', 'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouseover text of the BBCode', 'BBCODE_HELPLINE_TEXT' => 'Helpline text', + 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.', + 'BBCODE_OPEN_ENDED_TAG' => 'Your custom BBCode must contain both an opening and a closing tag.', 'BBCODE_TAG' => 'Tag', 'BBCODE_TAG_TOO_LONG' => 'The tag definition that you have entered is too long, please shorten your tag definition.', 'BBCODE_USAGE' => 'BBCode usage',