dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/pipes/safeHTML.pipe.ts @ 59152
1 |
import { Pipe, PipeTransform} from '@angular/core' |
---|---|
2 |
|
3 |
import { DomSanitizer, SafeUrl } from '@angular/platform-browser' |
4 |
|
5 |
@Pipe({ name: 'safeHtml'}) |
6 |
export class SafeHtmlPipe implements PipeTransform { |
7 |
constructor(private sanitized: DomSanitizer) {} |
8 |
|
9 |
transform(value):SafeUrl { |
10 |
return this.sanitized.bypassSecurityTrustHtml(value.replace(/ /g,'')); |
11 |
}
|
12 |
}
|