Hello,
Found a pair of bugs while testing the `HtmlPanel` as a `WebBrowser` replacement in another application. I've attached a sample application which will expose both, but essentially, consider the HTML below.
```
<html>
<head>
<meta charset="utf-8" />
<title>HtmlRenderer Issues 2</title>
<style type="text/css">
.icon
{
width: 32px;
height: 32px;
background-repeat: no-repeat;
background-position: 0 0;
}
.icon1
{
background-image: url(disc-blue.png);
}
.icon2
{
background-image: url('disc-blue.png');
}
.icon3
{
background-image: url("disc-blue.png");
}
</style>
</head>
<body>
<h1>HtmlRenderer Issues 2</h1>
<h2>Unquoted</h2>
<div class="icon icon1"></div>
<h2>Single Quotes</h2>
<div class="icon icon2"></div>
<h2>Double Quotes</h2>
<div class="icon icon3"></div>
</body>
</html>
```
Looking at this, you would expect to see 3 graphics displayed, but in fact only the first two are. The `icon3` div displays no background. It seems that the double quotes aren't being removed, so the renderer crashes trying to load the file. In this example it will print out the error captured via the `RenderError` event. The actual crash is in `CommonUtils.TryGetFileInfo`.
I guess you just need to parse out double quotes in the same way you're apparently parsing out the single quotes somewhere.
Regards;
Richard Moss
Comments: indeed, thx. should be easy to fix, pull is always welcome :)
Found a pair of bugs while testing the `HtmlPanel` as a `WebBrowser` replacement in another application. I've attached a sample application which will expose both, but essentially, consider the HTML below.
```
<html>
<head>
<meta charset="utf-8" />
<title>HtmlRenderer Issues 2</title>
<style type="text/css">
.icon
{
width: 32px;
height: 32px;
background-repeat: no-repeat;
background-position: 0 0;
}
.icon1
{
background-image: url(disc-blue.png);
}
.icon2
{
background-image: url('disc-blue.png');
}
.icon3
{
background-image: url("disc-blue.png");
}
</style>
</head>
<body>
<h1>HtmlRenderer Issues 2</h1>
<h2>Unquoted</h2>
<div class="icon icon1"></div>
<h2>Single Quotes</h2>
<div class="icon icon2"></div>
<h2>Double Quotes</h2>
<div class="icon icon3"></div>
</body>
</html>
```
Looking at this, you would expect to see 3 graphics displayed, but in fact only the first two are. The `icon3` div displays no background. It seems that the double quotes aren't being removed, so the renderer crashes trying to load the file. In this example it will print out the error captured via the `RenderError` event. The actual crash is in `CommonUtils.TryGetFileInfo`.
I guess you just need to parse out double quotes in the same way you're apparently parsing out the single quotes somewhere.
Regards;
Richard Moss
Comments: indeed, thx. should be easy to fix, pull is always welcome :)