mirror of
https://github.com/penpot/penpot.git
synced 2026-08-16 09:49:05 +00:00
12 lines
355 B
TypeScript
12 lines
355 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
|
|
@Pipe({ name: 'safeHtml', standalone: true })
|
|
export class SafeHtmlPipe implements PipeTransform {
|
|
constructor(private sanitized: DomSanitizer) {}
|
|
|
|
transform(value: string) {
|
|
return this.sanitized.bypassSecurityTrustHtml(value);
|
|
}
|
|
}
|