sanitize navbar color
This commit is contained in:
@@ -1286,6 +1286,13 @@ class NavbarSiteView extends View {
|
||||
color = this.getMetadata().get(['clientDefs', tab, 'color']);
|
||||
}
|
||||
|
||||
if (
|
||||
color &&
|
||||
!/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(color)
|
||||
) {
|
||||
color = null;
|
||||
}
|
||||
|
||||
if (!params.tabIconsDisabled && !isGroup && !isDivider && !isUrl) {
|
||||
iconClass = this.getMetadata().get(['clientDefs', tab, 'iconClass'])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user