Here's a short fix that uses HtmlDecode () to cancel the encoding. It works for me.
(It was not possible to reinstall the entire model of the Validation object.)
public static class ValidationExtensions { public static MvcHtmlString ValidationMessageHtmlFor<TModel, TProperty>( this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression) { return new MvcHtmlString( HttpUtility.HtmlDecode( htmlHelper.ValidationMessageFor<TModel, TProperty>( expression, null, ((IDictionary<string, object>)new RouteValueDictionary())) .ToHtmlString())); } }
source share