Welcome Guest, Not a member yet? Register   Sign In
Where is the best place to use html_escape? Model, view or controller?
#7

[eluser]behnampmdg3[/eluser]
[quote author="PhilTem" date="1351871234"]IMHO escaping is not necessarily data manipulation since the data itself actually stays the same it's just a different way of displaying it. Data manipulation would be trimming, concatenating, and stuff like that. Plus it's at the end of your whole process so you don't perform any more further tasks with the data you displayed.

- That's why I'm using escaping in the views Wink[/quote]I am not sure but isn't one of the points of mvc "separating php code from html"?

- I also am dealing with databases where have been built years ago and I do not have control over the data already in there. I assume controller or view when I am printing the data is not a bad idea Smile

Thanks


Messages In This Thread
Where is the best place to use html_escape? Model, view or controller? - by El Forum - 11-04-2012, 05:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB