I need to display a data from a database which contains strings like & or «. When I try to display them through Html.Raw or Html.Encode, I've got dublicates values like & for Html.Raw and also bad output for Html.Encode.
What should I try? I use Razor syntax.
Example string: Hello, my name is Junior & I hate «bugs».
Decode(), not either of the above. And doesn't MVC automatically do that with the<%: %>syntax?<%: %>is not Razor syntax...@Html.Raw(string)should be the proper syntax. Are you sure the string data in the database is not already escaped?