fix(ivy): sanitization for Host Bindings (#27939)
This commit adds sanitization for `elementProperty` and `elementAttribute` instructions used in `hostBindings` function, similar to what we already have in the `template` function. Main difference is the fact that for some attributes (like "href" and "src") we can't define which SecurityContext they belong to (URL vs RESOURCE_URL) in Compiler, since information in Directive selector may not be enough to calculate it. In order to resolve the problem, Compiler injects slightly different sanitization function which detects proper Security Context at runtime. PR Close #27939
This commit is contained in:

committed by
Kara Erickson

parent
1de4031d9c
commit
c3aa24c3f9
@ -305,6 +305,12 @@ export class BindingParser {
|
||||
}
|
||||
}
|
||||
|
||||
calcPossibleSecurityContexts(selector: string, propName: string, isAttribute: boolean):
|
||||
SecurityContext[] {
|
||||
const prop = this._schemaRegistry.getMappedPropName(propName);
|
||||
return calcPossibleSecurityContexts(this._schemaRegistry, selector, prop, isAttribute);
|
||||
}
|
||||
|
||||
private _parseAnimationEvent(
|
||||
name: string, expression: string, sourceSpan: ParseSourceSpan, targetEvents: ParsedEvent[]) {
|
||||
const matches = splitAtPeriod(name, [name, '']);
|
||||
|
Reference in New Issue
Block a user