MyBB Hacks

Full Version: Prevent trailing URL punctuation from being parsed into URLs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I see that this instance of MyBB has partially solved an issue that I reported at http://dev.mybb.com/issues/1623: punctuation at the end of URLs gets parsed into URLs.

As you can see above, colons are still parsed into the URL. But periods and commas aren't. Here's an URL with a trailing comma: http://forum.quantifiedself.com, and one with a trailing period: http://mybb.com.

Can someone please post the patch for this on the dev site?
As part of a path?
Haven't tried but search inc/class_parser.php for

Code:
/[^\"\s<\[]*

replace with

Code:
/[^:\"\s<\[]*

Oh nevermind, it's actually fixed in 1.6.3, but community.mybb.com is running an older version that still has these bugs.
Actually, it's not fully fixed. Punctuation after digits, or ".html" still gets parsed in. http://dev.mybb.com/issues/1623. http://dev.mybb.com/issues/1623.html.
That's odd - I see they rejected your bugreport. Do they give a reason why?
I'd be surprised if there wasn't any difference, since the community forums typically run the latest stable version (not development version).

Arguably, the automatic URL parsing also has some issues with brackets and similar, but it's also difficult to really say what's correct, since URLs often do have punctuation in them.  Omitting trailing punctuation means that the parser has to do some more heuristical analysis of what's there...
Reference URL's