I've been going through and converting my project to use the <%:
instead of the <%=
syntax, and have been annoyed that I also have to remove Html.Encode(zoozle)
all over the place. If it's left in place, zoozle
will get double-encoded.
This leaves me wondering, why doesn't Html.Encode
return HtmlString
, so that it doesn't get encoded again by <%:
?