phpBB

Code Changes

File: includes/acp/acp_bbcodes.php

  Unmodified   Added   Modified   Removed
Line 62Line 62
				}

$bbcode_match = $row['bbcode_match'];

				}

$bbcode_match = $row['bbcode_match'];

				$bbcode_tpl = htmlspecialchars($row['bbcode_tpl']);

				$bbcode_tpl = htmlspecialchars($row['bbcode_tpl'], ENT_COMPAT);

				$display_on_posting = $row['display_on_posting'];
$bbcode_helpline = $row['bbcode_helpline'];
break;

				$display_on_posting = $row['display_on_posting'];
$bbcode_helpline = $row['bbcode_helpline'];
break;

Line 86Line 86
				$display_on_posting = $request->variable('display_on_posting', 0);

$bbcode_match = $request->variable('bbcode_match', '');

				$display_on_posting = $request->variable('display_on_posting', 0);

$bbcode_match = $request->variable('bbcode_match', '');

				$bbcode_tpl = htmlspecialchars_decode($request->variable('bbcode_tpl', '', true));

				$bbcode_tpl = html_entity_decode($request->variable('bbcode_tpl', '', true), ENT_COMPAT);

				$bbcode_helpline = $request->variable('bbcode_helpline', '', true);
break;
}

				$bbcode_helpline = $request->variable('bbcode_helpline', '', true);
break;
}

Line 207Line 207
						$db->sql_freeresult($result);

// Grab the end, interrogate the last closing tag

						$db->sql_freeresult($result);

// Grab the end, interrogate the last closing tag

						if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded) || (preg_match('#\[/([^[]*)]$#', $bbcode_match, $regs) && in_array(strtolower($regs[1]), $hard_coded)))




						if (isset($info['test']) && $info['test'] === '1'
|| in_array(strtolower($data['bbcode_tag']), $hard_coded)
|| (preg_match('#\[/([^[]*)]$#', $bbcode_match, $regs) && in_array(strtolower($regs[1]), $hard_coded))
)

						{
trigger_error($user->lang['BBCODE_INVALID_TAG_NAME'] . adm_back_link($this->u_action), E_USER_WARNING);
}

						{
trigger_error($user->lang['BBCODE_INVALID_TAG_NAME'] . adm_back_link($this->u_action), E_USER_WARNING);
}

Line 232Line 235
						trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}


						trigger_error($user->lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}


					if (strlen($bbcode_helpline) > 255)

					if (strlen($bbcode_helpline) > 3000)

					{
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}

					{
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}

 

/**
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySQL to UCR/NCR.
* Using their Numeric Character Reference's Hexadecimal notation.
*/
$bbcode_helpline = utf8_encode_ucr($bbcode_helpline);


$sql_ary = array_merge($sql_ary, array(
'bbcode_tag' => $data['bbcode_tag'],


$sql_ary = array_merge($sql_ary, array(
'bbcode_tag' => $data['bbcode_tag'],

Line 325Line 334
						'action'				=> $action,
'bbcode' => $bbcode_id,
'bbcode_match' => $bbcode_match,

						'action'				=> $action,
'bbcode' => $bbcode_id,
'bbcode_match' => $bbcode_match,

						'bbcode_tpl'			=> htmlspecialchars($bbcode_tpl),

						'bbcode_tpl'			=> htmlspecialchars($bbcode_tpl, ENT_COMPAT),

						'bbcode_helpline'		=> $bbcode_helpline,
'display_on_posting' => $display_on_posting,
)))

						'bbcode_helpline'		=> $bbcode_helpline,
'display_on_posting' => $display_on_posting,
)))