Skip to content

Commit

Permalink
fix(@angular/build): support valid self-closing SVG tags in HTML inde…
Browse files Browse the repository at this point in the history
…x file

Prior to this change, the Angular build process incorrectly flagged self-closing SVG tags (e.g., `<path />`) as invalid HTML. This commit rectifies this issue by explicitly allowing self-closing syntax for SVG elements embedded within the HTML index file.

Closes: #27702
  • Loading branch information
alan-agius4 committed May 23, 2024
1 parent d303018 commit 5f9053a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/angular/build/src/utils/index-file/augment-index-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,29 @@ const VALID_SELF_CLOSING_TAGS = new Set([
'source',
'track',
'wbr',
/** SVG tags */
'circle',
'ellipse',
'line',
'path',
'polygon',
'polyline',
'rect',
'text',
'tspan',
'linearGradient',
'radialGradient',
'stop',
'image',
'pattern',
'defs',
'g',
'marker',
'mask',
'style',
'symbol',
'use',
'view',
]);

/*
Expand Down

0 comments on commit 5f9053a

Please sign in to comment.