Skip to content

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

Merged
colinodell merged 3 commits into
thephpleague:2.4from
macbookandrew:bugfix/autolinker-www-with-later-links
Jul 22, 2024
Merged

UrlAutolinkParser fails for text containing WWW and a subsequent link#1025
colinodell merged 3 commits into
thephpleague:2.4from
macbookandrew:bugfix/autolinker-www-with-later-links

Conversation

@macbookandrew

Copy link
Copy Markdown
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

@colinodell colinodell left a comment

Copy link
Copy Markdown
Member

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
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