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

Selfclosing Break Line Tag <br /> tag in html content is converted into <br> open tag. #122

Closed
BloodDrag0n opened this issue Jul 16, 2024 · 3 comments

Comments

@BloodDrag0n
Copy link

BloodDrag0n commented Jul 16, 2024

I am using antisamy to sanitize HTML contents. During the parsing of the HTML Data, the
(self-closing) tag is converted into
(open tag). Is there any specific reason behind this behavior change? Is there any way to retain the
tags?

Eg Input Html Data: <p>this is para data</p><br/><p>this is para data 2</p>

Eg Output Html Data: <p>this is para data</p><br><p>this is para data 2</p>

HtmlUnit-Neko version using - 3.11.2
Antisamy version using - 1.7.5

@rbri
Copy link
Member

rbri commented Jul 16, 2024

hi @BloodDrag0n, looks like a bug, will have a look

rbri added a commit that referenced this issue Jul 16, 2024
@rbri
Copy link
Member

rbri commented Jul 16, 2024

@BloodDrag0n have added a test case but for me this looks ok from a first look. Any idea?

@rbri
Copy link
Member

rbri commented Jul 16, 2024

looks like the root cause is in antisamy - not in neko; see nahsra/antisamy#484

@rbri rbri closed this as completed Jul 16, 2024
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