The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
when to use htmlspecialchars_uni
Sorry if this question sounds stupid...
I am adapting an old hack of mine, for a multilanguage site.. (in utf8) I have title, description and username to put into database (and pull from database and display) In the very old version info was escaped with addslashes($title),addslashes($description),addsla shes($username) and before display: stripspashes($title) etc.. etc... I now would like to do it with : $db->escape_string($title), $db->escape_string($description), $db->escape_string($username) Thats ok.. and I dont need the stripslashes anymore.. BUT... Should I add htmlspecialchars_uni before saving to db? OR after pulling from db? I meen should i do when saving... $db->escape_string(htmlspecialschars_uni($title)), $db->escape_string(htmlspecialschars_uni($description)), $db->escape_string(htmlspecialschars_uni($username)) Or should i only add the htmlspecialschars_uni() only before display.. (not before saving but: $title = htmlspecialschars_uni($title); $description = htmlspecialschars_uni($description); $username = htmlspecialschars_uni($username); I hope you understand what i meen.. F. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|