Skip to content

Commit bdda686

Browse files
leonsenftalan-agius4
authored andcommitted
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 fe1207e commit bdda686

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
@@ -274,19 +274,6 @@ describe('security integration tests', function () {
274274
clearTranslations();
275275
});
276276

277-
it('should throw error on translated SVG script ResourceURL attributes', () => {
278-
const template = `
279-
<svg>
280-
<script href="/safe-svg-script.js" i18n-href></script>
281-
</svg>
282-
`;
283-
TestBed.overrideComponent(SecuredComponent, {set: {template}});
284-
285-
expect(() => TestBed.createComponent(SecuredComponent)).toThrowError(
286-
/unsafe value used in a resource URL context/i,
287-
);
288-
});
289-
290277
it('should throw error on SVG animation retargeting attributes', () => {
291278
const template = `
292279
<svg>

0 commit comments

Comments
 (0)