Skip to content

Commit

Permalink
Update to AngleSharp.Css 0.16.3
Browse files Browse the repository at this point in the history
Add test for #322
Remove beta label on package version
  • Loading branch information
mganss committed Jan 6, 2022
1 parent fd1220f commit 627aeb4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HtmlSanitizer/HtmlSanitizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<InformationalVersion>$(AppVeyor_Build_Version)</InformationalVersion>
<FileVersion>$(AppVeyor_Build_Version).0</FileVersion>
<PackageVersion>$(AppVeyor_Build_Version)-beta</PackageVersion>
<PackageVersion>$(AppVeyor_Build_Version)</PackageVersion>
<Authors>Michael Ganss</Authors>
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
<AssemblyName>HtmlSanitizer</AssemblyName>
Expand Down Expand Up @@ -40,7 +40,7 @@

<ItemGroup>
<PackageReference Include="AngleSharp" Version="[0.16.1]" />
<PackageReference Include="AngleSharp.Css" Version="[0.16.2]" />
<PackageReference Include="AngleSharp.Css" Version="[0.16.3]" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

Expand Down
12 changes: 12 additions & 0 deletions test/HtmlSanitizer.Tests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3269,5 +3269,17 @@ public void ConstructorTest()
var sanitized = sanitizer.Sanitize(html);
Assert.Equal(html, sanitized);
}

[Fact]
public void Number322Test()
{
// see https://github.com/mganss/HtmlSanitizer/issues/322
var html = @"<html><head><style>p::-webkit-scrollbar-thumb { background: rgba(136, 136, 136, 1) }</style></head><body><p>test</p></body></html>";
var sanitizer = new HtmlSanitizer();
sanitizer.AllowedTags.Add("style");
var sanitized = sanitizer.SanitizeDocument(html);

Assert.Equal(html, sanitized);
}
}
}

0 comments on commit 627aeb4

Please sign in to comment.