(unsafeHtml: any)
| 47 | * @codeGenApi |
| 48 | */ |
| 49 | export function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML | string { |
| 50 | const sanitizer = getSanitizer(); |
| 51 | if (sanitizer) { |
| 52 | return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || ''); |
| 53 | } |
| 54 | if (allowSanitizationBypassAndThrow(unsafeHtml, BypassType.Html)) { |
| 55 | return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml)); |
| 56 | } |
| 57 | return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml)); |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing |
no test coverage detected