I have an issue in asp.net 4.
When I add an attribute on controls, then the render it encoded.
For example, when I type this code
I ran into this problem with an MvcHtmlHelper for an autocomplete.
I ended up using |~| instead of ', and then replacing that with ' after Html.TextBox had rendered the string, but before we returned it.
That's a really annoying "security" feature.