HtmlSanitizer icon indicating copy to clipboard operation
HtmlSanitizer copied to clipboard

CSS comments gets removed

Open pragatibaheti opened this issue 3 years ago • 1 comments

I want to preserve comments written in style tags also but I am not able to preserve them even though I am using RemovingComments event hook and canceling the event. It works fine in case of comments inside the body tag in HTML.

Here is the fiddle link https://dotnetfiddle.net/6H6bJe

pragatibaheti avatar Jan 18 '22 10:01 pragatibaheti

AngleSharp.Css does not keep comments in its object model after parsing. AFAICT this is in accordance with the CSSOM spec but I have opened an issue nonetheless: https://github.com/AngleSharp/AngleSharp.Css/issues/99

mganss avatar Jan 18 '22 18:01 mganss