From 67e2b328163f63af0949b54c023206e6fbab6aa6 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 15 Feb 2025 20:21:25 +0100 Subject: [PATCH] [ticket/17326] Ignore invalid class names PHPBB-17326 --- phpBB/adm/style/admin.js | 6 ++++++ 1 file changed, 6 insertions(+) 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);