You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When new lines and tabs are used in attributes, then run through SSR, they end up written into the HTML, eg. <div class="\none\ntwo\n"></div>. This breaks the class name and can cause a FOUC with Sapper, and would completely break rendering of HTML-only static-generated pages.
Describe the bug
When new lines and tabs are used in attributes, then run through SSR, they end up written into the HTML, eg.
<div class="\none\ntwo\n"></div>
. This breaks the class name and can cause a FOUC with Sapper, and would completely break rendering of HTML-only static-generated pages.Logs
N/A
To Reproduce
REPL: https://svelte.dev/repl/80b8863b778c4b608537a98fb811de43?version=3.16.7
If you download the REPL, change to
generate:'ssr'
and thenconsole.log(App.render())
, you getExpected behavior
I would expect the white space to be rendered into the HTML as white space characters, like the first
<div>
above.Stacktraces
N/A
Information about your Svelte project:
Your browser and the version: (e.x. Chrome 52.1, Firefox 48.0, IE 10)
N/A
Your operating system: (e.x. OS X 10, Ubuntu Linux 19.10, Windows XP, etc)
Arch Linux
Svelte version (Please check you can reproduce the issue with the latest release!)
3.16.7
Whether your project uses Webpack or Rollup
Rollup
Severity
HTML-only web pages would be severely broken by this bug, and it may not be obvious during development. Sapper sites will have a FOUC.
Additional context
I came across this bug by running into a bug causing a FOUC when I was using Svelte Material UI:
hperrin/svelte-material-ui#66
The text was updated successfully, but these errors were encountered: