Cursor build a pseudo-sethtml:
https://github.com/skorotkiewicz/pseudo-sethtml
replies(2):
<p>Hello <scr<script>ipt>alert(1)</scr<script>ipt> World</p>
The program outputs: $ node .
<p>Hello <script>alert(1)</script> World</p>
{
sanitizedHTML: '<p>Hello <script>alert(1)</script> World</p>',
wasModified: true,
removedElements: [],
removedAttributes: []
}
Asking a chatbot to make a security function and then posting it for others to use without even reviewing it is not only disrespectful, but dangerous and grossly negligent. Please take this down.