fix: URL hash should be escaped when used as selector

This commit is contained in:
alistair3149 2024-07-03 13:09:11 -04:00
parent 3bacdb7c87
commit d453adde07
No known key found for this signature in database

View file

@ -645,7 +645,7 @@ class TabberBuilder {
await this.createHeader();
await this.createIndicator();
const activeTab = this.tablist.querySelector( `#tab-${ urlHash }` ) || this.tablist.firstElementChild;
const activeTab = this.tablist.querySelector( `#tab-${ CSS.escape( urlHash ) }` ) || this.tablist.firstElementChild;
TabberAction.setActiveTab( activeTab );
TabberAction.updateHeaderOverflow( this.tablist );