diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js index f308bf9c12..3d37b0c331 100644 --- a/phpBB/adm/style/admin.js +++ b/phpBB/adm/style/admin.js @@ -280,6 +280,12 @@ function parse_document(container) // Live update BBCode font icon preview const updateIconClass = (element, newClass) => { + // Ignore invalid class names + const faIconRegex = /^(?!-)(?!.*--)[a-z0-9-]+(? { if (className.startsWith('fa-') && className !== 'fa-fw') { element.classList.remove(className);