A bug was reported regarding BBCode url tags not rendering correctly when the text ends in a URL with a path, query, or fragment component. Users per1234, sam, and david identified that the issue stems from the auto-linkify system interfering with the parser before it can recognize the [/url] tag. The fix was implemented in pull request #21215 and deployed, resolving the issue for all test cases. sam confirmed the fix, and per1234 thanked the team for the quick resolution.
We have a lot of posts that were written at a time when this markup was correctly rendered (prior to the migration from the SMF framework to Discourse) .
I have this confirmed as a core bug which we hope to fix over the next few weeks.
Specifically:
[url]http://example.com[/url] will work however: [url]http://example.com/example[/url] does not unless you add a trialing space [url]http://example.com/example [/url] .
I started stepping through stuff and it looks like something is tripping our parser here, possibly an escape rule. We will get this sorted, thanks for raising it.
I’m not super familiar with this code, but I took a quick look. I think it has something to do with the auto-linkify system. By the time the parser goes looking for the close url tag [/url], it has already been incorporated into an autolink.
e.g. note that the autolink here is to http://example.com/foo%5B/url%5D