The encode_entities() should be enough. That is if you insert the value into places like <p>HERE</p> or <input type="text" value="HERE">. If on the other hand you use it in <script>alert('HERE');</script> it's escaped wrong. Likewise in this case: <a href="page.pl?value=HERE"> or just <a href="HERE">.
Ad Update1: There should not be, but there had been errors in web servers that allowed things like this. It's safer to store the credentials in a different file outside the directories accessible by HTTP.
In reply to Re: Removing malicious HTML entities (now with more questions!)
by Jenda
in thread Removing malicious HTML entities (now with more questions!)
by Lawliet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |