Links in parentheses are not hyperlinked

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.

2 Likes

Let’s see

http://www.example.com

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?

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/dialects/autolink_dialect.js

It needs to deal with diff rules for domain part vs path part vs query string

2 Likes

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.

1 Like

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)

3 Likes

https://github.com/discourse/discourse/pull/4523

5 Likes