Server Error in '/' Application.

Value cannot be null.
Parameter name: input

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: input

Source Error:


Line 649:        '*******************************************************************************************************************************************************************************	
Line 650:        Public Shared Function stripBadHtml(ByVal theString As String) As String
Line 651:            theString = Regex.Replace(theString, "<(meta|link|/?o:|/?style|/?div|/?object|/?param|/?iframe|/?embed|/?st\d|/?head|/?html|body|/?body|/?script|/?span|/?xml|!\[)[^>]*?>", String.Empty, RegexOptions.IgnoreCase And RegexOptions.IgnorePatternWhitespace And RegexOptions.Multiline)
Line 652:            theString = Regex.Replace(theString, "/\s+(class|font|style|o:p)=""[^""]+""/", String.Empty, RegexOptions.IgnoreCase And RegexOptions.IgnorePatternWhitespace And RegexOptions.Multiline)
Line 653:            theString = Regex.Replace(theString, "<([a-z][a-z0-9]*)\b (?:(?:class|lang|style|size|face|align)\s*=\s*(?:'[^<']*'|""[^<""]*""|[^\s<>]+)\s+)+.*?>", String.Empty, RegexOptions.IgnoreCase And RegexOptions.IgnorePatternWhitespace And RegexOptions.Multiline)

Source File: d:\resiwebs\hprealty.org\mobile\App_Code\inc-RESI.vb    Line: 651

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: input]
   System.Text.RegularExpressions.Regex.Replace(String input, String replacement) +8150372
   System.Text.RegularExpressions.Regex.Replace(String input, String pattern, String replacement, RegexOptions options) +106
   RESI.Functions.Functions.stripBadHtml(String theString) in d:\resiwebs\hprealty.org\mobile\App_Code\inc-RESI.vb:651
   ASP.disclaimer_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\resiwebs\hprealty.org\mobile\disclaimer.aspx:158
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   inc_aboutUs.Render(HtmlTextWriter writer) in d:\resiwebs\hprealty.org\mobile\App_Code\inc-AboutUs.vb:38
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8753


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0