mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17326] Update regex checks for font icon in php and js files
PHPBB-17326
This commit is contained in:
parent
bb956539a4
commit
53d7fff391
2 changed files with 5 additions and 2 deletions
|
@ -280,7 +280,10 @@ function parse_document(container)
|
|||
|
||||
// Live update BBCode font icon preview
|
||||
$('#bbcode_font_icon').on('keyup', function(e) {
|
||||
$('#bbcode_icon_preview').attr('class', "o-icon o-icon-font fa-fw fas icon fa-" + $(this).val());
|
||||
const iconName = $(this).val();
|
||||
if (iconName.match(/^[\w-]+$/)) {
|
||||
$('#bbcode_icon_preview').attr('class', "o-icon o-icon-font fa-fw fas icon fa-" + $(this).val());
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
@ -238,7 +238,7 @@ class acp_bbcodes
|
|||
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (strlen($bbcode_font_icon) > 64 && preg_match('/^[A-Za-z0-9-]+$/', $bbcode_font_icon))
|
||||
if (strlen($bbcode_font_icon) > 64 && preg_match('/^[\w-]+$/', $bbcode_font_icon))
|
||||
{
|
||||
trigger_error($user->lang['BBCODE_FONT_ICON_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue