Files
sweet/tests/fixture/routes/islands/index.tsx
T
OkadaGenya 9d13f6ff26 fix: sanitize <script> in __FRSH_STATE state (#739)
This commit escapes `<` `>` and related characters in the serialized state that is encoded into the `<script id=__FRSH_STATE>` tag. This prevents XSS attack occuring through injection of a `</script>` string in island props.
2022-09-12 17:33:02 +02:00

16 lines
493 B
TypeScript

import Counter from "../../islands/Counter.tsx";
import KebabCaseFileNameTest from "../../islands/kebab-case-counter-test.tsx";
import Test from "../../islands/Test.tsx";
export default function Home() {
return (
<div>
<Counter id="counter1" start={3} />
<Counter id="counter2" start={10} />
<KebabCaseFileNameTest id="kebab-case-file-counter" start={5} />
<Test message="" />
<Test message={`</script><script>alert('test')</script>`} />
</div>
);
}