Html.Encode in .NET 3.5 (used to encode special characters to help stop SQL injection attacks) worked on all the special characters except a single quote. So if you called Html.Encode (“O’Connor”), it would not encode the single quote. They fixed this in .NET 4.0 when it started properly encoding to '