Stop filtering JS code in bot messages

This commit is contained in:
R. Richard
2020-05-18 18:01:30 +02:00
parent 031a9916a0
commit d8545c48be
3 changed files with 14 additions and 2 deletions
+11
View File
@@ -11,3 +11,14 @@ export class SafePipe implements PipeTransform {
return this.sanitizer.bypassSecurityTrustResourceUrl(value);
}
}
@Pipe({
name: 'safeHtml'
})
export class SafeHtmlPipe implements PipeTransform {
constructor(private sanitized: DomSanitizer) {}
transform(value) {
return this.sanitized.bypassSecurityTrustHtml(value);
}
}