Continuing the discussion from Dealing with unwanted (and probably spam) accounts from other countries?:
I noticed when typing the comment above that links in parentheses are not hyperlinked.
The discussion focuses on an issue with links in parentheses not being hyperlinked on the Discourse platform. strager initially noticed this problem while typing a comment. codinghorror tested and confirmed the issue, and sam attributed it to the autolink regex being “nasty” and “broken in quite a few cases.” sam provided a link to the relevant code and identified specific lines of code as part of the problem. rikling and sam further analyzed the code, and mcwumbly and jomaxro shared their own experiences with the issue. As a workaround, jomaxro suggested surrounding the link with < and >. A pull request, https://github.com/discourse/discourse/pull/4523, was submitted to address the issue.
Continuing the discussion from Dealing with unwanted (and probably spam) accounts from other countries?:
I noticed when typing the comment above that links in parentheses are not hyperlinked.
Let’s see
And (http://www.example.com) so yep, you’re right.
The autolink regex is nasty, and broken in quite a few cases
Can you post a link to the exact line of code here and I will look at it?
It needs to deal with diff rules for domain part vs path part vs query string
I think this is part of the problem.
is another part of the problem.
Just ran into this… It seems relatively common behavior on our site right now for people to parenthetically include links.
Ran into this as well today. Easy enough to surround the link with <> but annoying nonetheless.
Examples:
Doesn’t work:
(http://www.example.com)
(http://www.example.com)
Works:
(<http://www.example.com>)
(http://www.example.com)