Why is htmlspecialchars adding slashes to my webpage?

Posted by Cortopasta on Stack Overflow See other posts from Stack Overflow or by Cortopasta
Published on 2010-06-12T21:50:30Z Indexed on 2010/06/12 22:03 UTC
Read the original article Hit count: 407

Filed under:
|
|
|

I have my input placed into mySQL through a PDO prepared statement, and have it placed in my website with PHP using htmlspecialchars() to protect against XSS. Only problem is now I get slashes, before any quotes, that are visible on the webpage to the user it only happens when I upload it to the server. Never happens on my localhost.

Why is this happening?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql