From 1004d4773838f9e8ec210de0fac00f3bc410f6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 20 Jul 2023 11:03:18 +0200 Subject: [PATCH] fix: mark SVG path as sanitized --- .changeset/pretty-bottles-trade.md | 5 +++++ lib/octicons_angular/script/build.js | 2 +- lib/octicons_angular/src/octicon-component-base.ts | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/pretty-bottles-trade.md diff --git a/.changeset/pretty-bottles-trade.md b/.changeset/pretty-bottles-trade.md new file mode 100644 index 000000000..63f79abe6 --- /dev/null +++ b/.changeset/pretty-bottles-trade.md @@ -0,0 +1,5 @@ +--- +'@openproject/octicons': patch +--- + +fix: mark SVG Path as sanitized diff --git a/lib/octicons_angular/script/build.js b/lib/octicons_angular/script/build.js index 4b05df92b..d81d89197 100755 --- a/lib/octicons_angular/script/build.js +++ b/lib/octicons_angular/script/build.js @@ -47,7 +47,7 @@ const icons = Object.entries(octicons) template: \` {{title}} - + \`, }) export class Op${name} extends OpOcticonComponentBase { diff --git a/lib/octicons_angular/src/octicon-component-base.ts b/lib/octicons_angular/src/octicon-component-base.ts index cf961bacb..bee5590da 100644 --- a/lib/octicons_angular/src/octicon-component-base.ts +++ b/lib/octicons_angular/src/octicon-component-base.ts @@ -3,6 +3,7 @@ import { Input, HostBinding } from '@angular/core'; +import { DomSanitizer } from '@angular/platform-browser'; import { closestNaturalHeight } from './helpers'; @Directive({}) @@ -71,4 +72,6 @@ export class OpOcticonComponentBase { path: string, }; } = {}; + + constructor(protected sanitizer:DomSanitizer) {} }