Who's responsibility is it to encode a string, the model or the view?
I've a string from a database, it's come from the user - I want to keep as a much information as possible in the database, so I'm saving the input verbatim.
When I come to display the string, should I be encoding it when I populate the view model, or should the view decide if it wants to display it encoded or not?
Thanks,
K
The View
The difference between the two is that The Model holds that data and The View is responsible for showing the data based on the output medium. Because if you wanted to transmit this data over some none HTML medium you probably don't want it HTML encoded.