1
Vote

Title wrong html encode/decode

description

Title of pages is wrongly encoded when displayed in HorizontalMenu.ascx.cs :
  • Title is stored encoded (correct behavior)
  • In HorizontalMenu.ascx.cs, line 47, HttpUtility.HtmlEncode() is called
  • Html.ActionLink encodes all inputs.
     
    The only way I found to prevent this was to call HttpUtility.HtmlDecode() instead of HttpUtility.HtmlEncode() :
    buffer += Html.ActionLink(HttpUtility.HtmlDecode(page.Title), "View", "Page", new { slug = page.Slug }) + "</li>\n";

comments

jf26028 wrote Jun 6, 2008 at 3:00 AM

styx,

Thanks for not only pointing this out, but proposing the fix. Ill push it in the next release.

Jesse

wrote Feb 13, 2013 at 2:28 AM