Skip to content
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

Sanitizer 5.x remove fonts #224

Closed
lukapor opened this issue May 22, 2020 · 3 comments
Closed

Sanitizer 5.x remove fonts #224

lukapor opened this issue May 22, 2020 · 3 comments

Comments

@lukapor
Copy link

lukapor commented May 22, 2020

Hi I try to upgraded html sanitiner library from version 4.x to 5.x

I have some issues with version 5 which clean to much :)

I call just simple sanitize (code below)

htmls.zip

var sanitizer = new HtmlSanitizer();
sanitizer.Sanitize(html);

Version 5 cleans all fonts defined as font: ..

I attached html.html as original source, and html as result after cleaning with versions 4.x and 5.x

@mganss
Copy link
Owner

mganss commented May 22, 2020

Thanks for reporting this. The problem is with the numerical specification of font-weight in the font shorthand. This seems to be a bug in AngleSharp.Css. I've submitted an issue here: AngleSharp/AngleSharp.Css#56

@mganss
Copy link
Owner

mganss commented May 25, 2020

This was fixed in AngleSharp/AngleSharp.Css#57 and will be fixed in HtmlSanitizer with the next release of AngleSharp.Css.

@mganss
Copy link
Owner

mganss commented Jun 12, 2020

Fixed in 5.0.331.

@mganss mganss closed this as completed Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants