Line 161 in StreamReaderExtension.cs:
htmlContents = Regex.Replace(htmlContents, @"// (.*?)\r?\n", "", RegexOptions.Singleline);
This catches regex expressions in javascripts that have escaped forward slashes. For example:
url += $('#field').val().replace(/\//g, '').replace(/&/g, 'and').substring(0, 50) + '/';
the regex expression "/\//g" is valid, but not a comment.
Trying to think of a workaround for this line, but my regex is a little rusty.
I was thinking this:
htmlContents = Regex.Replace(htmlContents, @"[^\]// (.*?)\r?\n", "", RegexOptions.Singleline);
Line 161 in StreamReaderExtension.cs: htmlContents = Regex.Replace(htmlContents, @"// (.*?)\r?\n", "", RegexOptions.Singleline);
This catches regex expressions in javascripts that have escaped forward slashes. For example: url += $('#field').val().replace(/\//g, '').replace(/&/g, 'and').substring(0, 50) + '/';
the regex expression "/\//g" is valid, but not a comment.
Trying to think of a workaround for this line, but my regex is a little rusty.
I was thinking this:
htmlContents = Regex.Replace(htmlContents, @"[^\]// (.*?)\r?\n", "", RegexOptions.Singleline);
But that also fails.