1
Vote

Problem with HtmlCodeHelper (exception gets thrown in Admin)

description

Hello,

We noticed a problem with HtmlCodeHelper when listing comments in admin on our website.

A spambot entered a lot of comments that start with "http://" and this can cause an exception to be thrown in HtmlCodeHelper. The exception is throw on line 67 by Path.GetExtension(). The problem is the assumption made at line 64:
if (s.StartsWith("~/") || s.StartsWith("/") || s.StartsWith("http://"))

comments

kooboo wrote Apr 24, 2013 at 2:20 AM

Fixed it. Thanks