Add no-sanitize pipe

This commit is contained in:
hunicus
2022-03-27 01:19:48 -04:00
parent c6c335921c
commit 663cf100d1
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@Pipe({ name: 'noSanitize' })
export class NoSanitizePipe implements PipeTransform {
constructor(private domSanitizer: DomSanitizer) { }
transform(html: string): SafeHtml {
return this.domSanitizer.bypassSecurityTrustHtml(html);
}
}