issue is
The following block is my input:
<html><hr><br><div style="font-weight:bold;">aaaaaaaa</div>
<div>bbbbbbbbb.</div>
<div>dddddddddd <u>dddd</u> ddddd</div>
</html>
And the following is my output:
<html></html><hr /><br /><div style="font-weight:bold">aaaaaaaa</div>
<div>bbbbbbbbb.</div>
<div>dddddddddd <u>dddd</u> ddddd</div>
Bug
As can be seen at the end of my input the closing tag is being moved by the sanitizer right to its starting tag in the output.
This is my policy
new HtmlPolicyBuilder()
.allowStandardUrlProtocols()
.allowElements("a", "hr", "br", "div", "u")
.allowElements("html")
.allowStyling()
.toFactory();
not part of the issue
Just by the way: is it possible to turn off the conversion of single opened tags into closed tags like for example:
- from
<hr> to <hr />
- from
<br> to <br />
Kind regards
issue is
The following block is my input:
And the following is my output:
Bug
As can be seen at the end of my input the closing tag is being moved by the sanitizer right to its starting tag in the output.
This is my policy
not part of the issue
Just by the way: is it possible to turn off the conversion of single opened tags into closed tags like for example:
<hr> to <hr /><br> to <br />Kind regards