sveltejs / kit

web development, streamlined
https://svelte.dev/docs/kit
MIT License
18.73k stars 1.94k forks source link

XML Response wrongly includes <script> tag #9360

Closed andrei0x309 closed 1 year ago

andrei0x309 commented 1 year ago

Describe the bug

Svelte kit inserts <script async="false" fetchpriority="high"/> in XML responses. using +server.ts

Any kind of tag will lead to this behavior.

image

This same thing will happen with pretenders on or off or running in dev, tested the latest public version: "@sveltejs/kit": "1.10.0"

But happened in previous versions as well like: "@sveltejs/kit": "1.1.1",

Reproduction

https://github.com/andrei0x309/sk-script-in-xml

Logs

No response

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
    Memory: 13.19 GB / 27.93 GB
  Binaries:
    Node: 18.13.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.18 - ~\AppData\Local\Yarn\bin\yarn.CMD
    npm: 8.0.0 - ~\AppData\Roaming\npm\npm.CMD
  Browsers:
    Chrome: 110.0.5481.178
    Edge: Spartan (44.19041.1266.0), Chromium (110.0.1587.63)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @sveltejs/kit: ^1.10.0 => 1.10.0
    svelte: ^3.55.1 => 3.55.1
    vite: ^4.1.4 => 4.1.4

Severity

annoyance

Additional Information

No response

andrei0x309 commented 1 year ago

hmm must be a browser extension bug checked with the view source and there's no response malformation. Closing.