Monday 23 February 2009

Html Encoding in MonoRail Views

I was surprised that there didn't seem to be a method for HTML encoding using the HtmlHelper in MonoRail. At least, that's what the assembly manifest and documentation would lead you to believe.

It turns out that there is an HtmlEncode method on the AbstractHelper base class, so you can just call HtmlHelper.HtmlEncode() after all!

No comments: