diff --git a/src/lib/reporter.ts b/src/lib/reporter.ts index e394513..7b438b5 100644 --- a/src/lib/reporter.ts +++ b/src/lib/reporter.ts @@ -102,3 +102,9 @@ Handlebars.registerHelper( 'severityNumber', (severity: string) => severityMap[severity]?.number ) + +Handlebars.registerHelper( + 'nameHandler', + (input) => { + return input.replace('@',"").replace('/',"-") + }) diff --git a/templates/template.hbs b/templates/template.hbs index 731ec27..08dd371 100644 --- a/templates/template.hbs +++ b/templates/template.hbs @@ -208,7 +208,7 @@ class="badge badge-{{severityClass severity}}">{{severity}} {{via.length}} + data-target="#advisory-modal-{{nameHandler name}}">{{via.length}} {{/each}} @@ -220,7 +220,7 @@ {{#each vulnerabilities}} -