Skip to content

Commit 2fe797e

Browse files
committed
Panel: Generate header id manually
We use [email protected] to generate our header id. [email protected] is reported to be unsafe and contains vulnerabilities [1]. As a step towards removing [email protected] as a dependencies, let's replace all usage of the 'string' methods with suitable equivalents. [1] - jprichardson/string.js#212
1 parent 86dc5ea commit 2fe797e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Panel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
if (this.headerContent) {
300300
const panelHeaderText = jQuery(this.headerContent).wrap('<div></div>').parent().find(':header').text();
301301
if (panelHeaderText) {
302-
this.$refs.cardContainer.setAttribute('id', string(panelHeaderText).slugify().toString());
302+
this.$refs.cardContainer.setAttribute('id', String(panelHeaderText).trim().toLowerCase().replace(/\s+/g, '-'));
303303
}
304304
} else if (this.$refs.headerWrapper.innerHTML) {
305305
const header = jQuery(this.$refs.headerWrapper.innerHTML).wrap('<div></div>').parent().find(':header');

0 commit comments

Comments
 (0)