preact-render-to-string
preact-render-to-string copied to clipboard
fix: escape a single quote
Hi,
Firstly, thank you for the great project.
In this PR, I've implemented the escaping of a single quote (0x27) to '. This modification will prevent the potential execution of scripts, as illustrated below:
const value = "alert('bar!')";
return <div onMouseOver={value}>foo</div>;