Is there any option to have a less strict html validator?
I am trying to do some queries on a table which has a column which contains a html style email message, but when I call Util.RawHtml on the column it gives the error Cannot parse custom HTML: '
The following samples give an illustration of a good and bad example which seems to be caused by the presence of
Is there anything that can be done to display such messages?
Thanks
Stephen
PS
Apologies for the formatting, hopefully this will be readable.
The following samples give an illustration of a good and bad example which seems to be caused by the presence of
<meta>
and <br>
tags without the corresponding </meta>
and </br>
tags.
var html = @"
<html>
<head>
<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1""></meta>
</head>
<body>
<b>Hello</b><br></br>world.
</body>
</html>
";
Util.RawHtml(html).Dump(); // Works fine
var html2 = @"
<html>
<head>
<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">
</head>
<body>
<b>Hello</b><br>world.
</body>
</html>
";
Util.RawHtml(html2).Dump(); // Throws error Cannot parse custom HTML:
Is there anything that can be done to display such messages?
Thanks
Stephen
PS
Apologies for the formatting, hopefully this will be readable.
Comments
LINQPad's Dump method is implemented mostly as a LINQ query, which is why it relies on LINQ to XML.
I decide to forget about trying to display to message but instead display a link which opens a webbrowser ie I also needed to add System.Windows.Forms.dll to the defaults