Skip to content

Commit d89b707

Browse files
committed
test(core): remove obsolete SVG script sanitization translation test
Removes the `should throw error on translated SVG script ResourceURL attributes` integration test from `security_integration_spec.ts`. This test is now obsolete because SVG `<script>` elements are stripped during template compilation (implemented in 90494cd). As a result, they are no longer present in the compiled template to trigger runtime sanitization, causing this test (which expected a sanitization error to be thrown) to fail.
1 parent 933608c commit d89b707

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

packages/core/test/linker/security_integration_spec.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -288,19 +288,6 @@ describe('security integration tests', function () {
288288
clearTranslations();
289289
});
290290

291-
it('should throw error on translated SVG script ResourceURL attributes', () => {
292-
const template = `
293-
<svg>
294-
<script href="/safe-svg-script.js" i18n-href></script>
295-
</svg>
296-
`;
297-
TestBed.overrideComponent(SecuredComponent, {set: {template}});
298-
299-
expect(() => TestBed.createComponent(SecuredComponent)).toThrowError(
300-
/unsafe value used in a resource URL context/i,
301-
);
302-
});
303-
304291
it('should throw error on SVG animation retargeting attributes', () => {
305292
const template = `
306293
<svg>

0 commit comments

Comments
 (0)