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

Abusive removal of br nodes leads to incorrect output #54

Open
ahfeel opened this issue Oct 17, 2017 · 4 comments
Open

Abusive removal of br nodes leads to incorrect output #54

ahfeel opened this issue Oct 17, 2017 · 4 comments

Comments

@ahfeel
Copy link

ahfeel commented Oct 17, 2017

Hello !

There is some code doing intentional removal of
nodes when they are the last child of a node that also contained text. Here's a very simple example about how this can lead to incorrect results (this is stuff I'm receiving from bad html emails) :

<font size="+1">Vikings: Wolves of Midgard<br></font><font size="+1">Valkyria Chronicles<br>
<br>
World Of Warcraft Battlechest</font>

The expected output would be

Vikings: Wolves of Midgard
Valkyria Chronicles

World Of Warcraft Battlechest

The actual output is:

Vikings: Wolves of MidgardValkyria Chronicles

World Of Warcraft Battlechest
@soundasleep
Copy link
Owner

I agree this is a bug - if anyone would have the chance to make a PR (with tests) that fixes this, that would be amazing!

@NirvashPrime
Copy link

I put in a PR a few days ago to address this:

#75

@Deepakchawde
Copy link

Hey i want t try to fix these problem

@bilogic
Copy link

bilogic commented Apr 28, 2022

@soundasleep can help with PR #75? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants