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