I want to apply one function called htmlentities
in every field which retrieve from table.
how can i do this? i have used beforeMarshal
but its only affect while save data in database. its not affecting while retrieve data from database.
So is there any function in cakaPHP that i can make the functionality possible as above I don't want to write this function each and every place that i am retrieving I want global solution that i will change at one place and it will affect to every fetch data?
I want to apply htmlentities
because to not affecting code from user like content <script>alert("u have hacked");</script>