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

UrlAutolinkParser fails for text containing WWW and a subsequent link #1025

Conversation

macbookandrew
Copy link
Contributor

For strings containing www followed by a link using [link](https://…) format, the parser mangles the resulting HTML:

<!-- given this string of markdown -->
WWW text followed by a [link](https://example.com/foo-bar-test)

<!-- expected result -->
<p>WWW text followed by a <a href="https://example.com/foo-bar-test">link</a></p>

<!-- actual result -->
<p><a href="https://example.com/foo-bar-test">https://example.com/foo-bar-test</a>tps://example.com/foo-bar-test)</p>

@macbookandrew macbookandrew marked this pull request as ready for review May 22, 2024 16:57
Copy link
Member

@colinodell colinodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for spotting this issue and fixing it!

@colinodell colinodell merged commit fd45b92 into thephpleague:2.4 Jul 22, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants