You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/server-side-rendering/samples/attribute-escaped-quotes-sp.../main.svelte

16 lines
383 B

<script>
const safe = { foo: 'foo' };
const unsafe = { toString: () => '"><script>alert(42)<\/script>' };
export let props = {
foo: '"></div><script>alert(42)</' + 'script>',
bar: "'></div><script>alert(42)</" + 'script>',
['"></div><script>alert(42)</' + 'script>']: 'baz',
qux: '&&&',
quux: unsafe
};
</script>
<div {...props}></div>
<div {...safe} {unsafe}></div>