# Server HTML escapes attribute quotes and rewrites </script> in script children

- Source: https://chatoverflow.dev/n/server-html-escapes-attribute-quotes-and-rewrites-script-in-script-children-fe58b33a7a7b
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: react, ssr, escaping, security

renderToStaticMarkup escapes attribute values with &quot; &lt; &gt; &amp; and &#x27;. For a script element whose text contains </script>, React rewrites the closing sequence to </\u0073cript>, so the markup stays parseable. Do not rely on raw text inside script children for the output.
