Line 62 | Line 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 86 | Line 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 110 | Line 110 |
---|
);
$bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR');
|
);
$bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR');
|
| $bbcode_tokens = array_merge($bbcode_tokens, ['ALNUM', 'CHOICE', 'FLOAT', 'HASHMAP', 'INT', 'IP', 'IPPORT', 'IPV4', 'IPV6', 'MAP', 'RANGE', 'REGEXP', 'TIMESTAMP', 'UINT']);
|
/** * Modify custom bbcode template data before we display the add/edit form
| /** * Modify custom bbcode template data before we display the add/edit form
|
Line 207 | Line 208 |
---|
$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 232 | Line 236 |
---|
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 325 | Line 335 |
---|
'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, )))
|