-
Svelte 4 was generating valid XML by self-closing void elements such as With Svelte 5, no self-closing elements are generated anymore to be more HTML 5 compliant. That means, I now get the error that the template cannot be rendered because the "content is not valid XML". This breaks rendering on documents that use XHTML. I have tried manually self-closing the Is there some way to either tell Svelte 5 to generate proper XML/XHTML or to tell the compiler to hone my manually added closing elements because I actually know better what I need than the framework does? Issues opened related to this discussion: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
To my knowledge there is no compiler option for this. How exactly do you interact with the XML and component code? |
Beta Was this translation helpful? Give feedback.
There is an active PR which seems to fix the XHTML compatibility: #15538
I tried the PR locally and it seemed to work ok.