-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Blazor, NET5] Tags are sanitized differently from .NET Framework #298
Comments
The .NET fiddle seems to be using an older version (I can't tell which one exactly). The output you're seeing with the latest version of HtmlSanitizer is what's expected (see also AngleSharp/AngleSharp#101). I'll update the fiddle. |
Thx, that clarifies. using System;
Here the font-size is removed. When I change the font-size to xx-large it works. It seems xxx-large is seen as an illegal property |
It seems this is unsupported by AngleSharp.Css because it's fairly new (e.g. currently unsupported by Safari and others, too). I've opened an issue here: AngleSharp/AngleSharp.Css#77 |
Thx, it comes from a component I am using. For now, I will do a search and replace:
|
Fixed in 6.0.441 via AngleSharp 0.16.1 |
When running the following code in the default .NET fiddle with .NET 4.7.2
The output is as expected:
<div style="background-color: test">Test<img src="http://www.example.com/test.gif" style="margin: 10px"></div>
However, when changing to .NET 5 and HtmlSanitizer 6.0.437 the output is stripped of the style attributes:
<div>Test<img src="http://www.example.com/test.gif" style="margin: 10px"></div>
The same happens in my own code in Blazor with .NET 5
The text was updated successfully, but these errors were encountered: