Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions packages/core/src/sanitization/dom_security_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ export function SECURITY_SCHEMA(): {[k: string]: SecurityContext} {
['object', ['codebase', 'data']],
]);

// The below are for Script SVG
// See: https://developer.mozilla.org/en-US/docs/Web/API/SVGScriptElement/href
registerContext(SecurityContext.RESOURCE_URL, SVG_NAMESPACE, [
['script', ['src', 'href', 'xlink:href']],
]);

// Keep this in sync with SECURITY_SENSITIVE_ELEMENTS in packages/core/src/sanitization/sanitization.ts
// The `unknown` elements refer to cases when we need to validate the input/binding in a directive (host bindings)
// and the directive can be applied to multiple different elements (with different tag names). In this case we generate
Expand Down
13 changes: 0 additions & 13 deletions packages/core/test/linker/security_integration_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,19 +288,6 @@ describe('security integration tests', function () {
clearTranslations();
});

it('should throw error on translated SVG script ResourceURL attributes', () => {
const template = `
<svg>
<script href="/safe-svg-script.js" i18n-href></script>
</svg>
`;
TestBed.overrideComponent(SecuredComponent, {set: {template}});

expect(() => TestBed.createComponent(SecuredComponent)).toThrowError(
/unsafe value used in a resource URL context/i,
);
});

it('should throw error on SVG animation retargeting attributes', () => {
const template = `
<svg>
Expand Down
Loading