Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protect JQuery code against XSS

Tags:

jquery

xss

I am working on an HTML form that posts the data to a URL. I am also using Jquery to get query string parameters and add them to the data I post to the URL. Is there any way to protect against XSS attacks? Any HTML encoding plugins or built-in functions?

like image 729
Michael Larionov Avatar asked Aug 10 '26 16:08

Michael Larionov


1 Answers

The answer of jigfox is not 100% right. Sometimes, you could use data from the URL directly in JavaScript. Even if you sanitize a link server side, it doesn't mean that another website can't link to your Website using a malicious URL.

I use this URL to proof check my Websites: https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet

like image 55
tink01 Avatar answered Aug 13 '26 08:08

tink01



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!