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

stripping the space from the first href contained in a paragraph tag #12

Open
degoya opened this issue Dec 15, 2015 · 7 comments
Open

Comments

@degoya
Copy link

degoya commented Dec 15, 2015

Example:

Ilove fresh bread
I<a href="#">love</a> fresh <a href="#">bread</a></p>

Expected result:
I love fresh bread
I <a href="#">love</a> fresh <a href="#">bread</a></p>

@aolin480
Copy link

Having the same issue as well.. I have <div>Cheese <span>Pizza</span></div>, but it's turning it into <div>Cheese<span>Pizza</span></div>

@paullferguson
Copy link

I'm seeing the same with <em> and <a> elements inside <p>

@paullferguson
Copy link

Not exactly a fix but I have found commenting out line 88 sorted the issue for me.
Thanks to Jeff Blum

@aolin480
Copy link

Good find @paullferguson! I haven't revisited this, but will definitely make a note!

@beeb
Copy link

beeb commented May 7, 2016

@paullferguson since line 88 is the only line actually doing something, we can comment out lines 74-92.

@steoo
Copy link

steoo commented Apr 5, 2017

Same problem here. I think we should make a PR, also with #18

@ashucg
Copy link

ashucg commented May 5, 2017

Hi everyone,
I am late to the party but I think replacing $c->nodeValue = trim($c->nodeValue); with $c->nodeValue = preg_replace('/\s{2,}/im', '', $c->nodeValue); is much better way to fix this issue.
What do you guys think?

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

6 participants