(tag: string, prop: string)
| 242 | * If tag and prop names don't match URL or Resource URL schema, no sanitizer is required. |
| 243 | */ |
| 244 | export function getUrlSanitizer(tag: string, prop: string) { |
| 245 | switch (getSecurityContext(tag, prop)) { |
| 246 | case SecurityContext.RESOURCE_URL: |
| 247 | return ɵɵsanitizeResourceUrl; |
| 248 | case SecurityContext.URL: |
| 249 | return ɵɵsanitizeUrl; |
| 250 | default: |
| 251 | return null; |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * Sanitizes URL, selecting sanitizer function based on tag and property names. |
no test coverage detected