Skip to content

Commit

Permalink
fixup! fix(compiler): adding the inert property to the "SCHEMA" array
Browse files Browse the repository at this point in the history
  • Loading branch information
physicx237 committed Nov 24, 2023
1 parent 1347dad commit b637b7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/compiler/src/schema/dom_security_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function SECURITY_SCHEMA(): {[k: string]: SecurityContext} {
'iframe|srcdoc',
'*|innerHTML',
'*|outerHTML',
'*|inert',
]);
registerContext(SecurityContext.STYLE, ['*|style']);
// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ If 'onAnything' is a directive input, make sure the directive is imported by the

it('should check security contexts for attributes', () => {
expect(registry.securityContext('p', 'innerHtml', true)).toBe(SecurityContext.HTML);
expect(registry.securityContext('p', 'inert', true)).toBe(SecurityContext.HTML);
expect(registry.securityContext('p', 'formaction', true)).toBe(SecurityContext.URL);
});

Expand Down

0 comments on commit b637b7c

Please sign in to comment.