Prevent trailing URL punctuation from being parsed into URLs
dandv Offline
Junior Member
**
Posts: 5
Joined: Jul 2011
Post: #1
Prevent trailing URL punctuation from being parsed into URLs
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?
07-09-2011 09:57 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Prevent trailing URL punctuation from being parsed into URLs
As part of a path?
Haven't tried but search inc/class_parser.php for

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

replace with

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


My Blog
07-10-2011 10:26 AM
Find all posts by this user Quote this message in a reply
dandv Offline
Junior Member
**
Posts: 5
Joined: Jul 2011
Post: #3
RE: Prevent trailing URL punctuation from being parsed into URLs
Oh nevermind, it's actually fixed in 1.6.3, but community.mybb.com is running an older version that still has these bugs.
07-10-2011 11:49 AM
Find all posts by this user Quote this message in a reply
dandv Offline
Junior Member
**
Posts: 5
Joined: Jul 2011
Post: #4
RE: Prevent trailing URL punctuation from being parsed into URLs
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.
07-15-2011 08:09 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #5
RE: Prevent trailing URL punctuation from being parsed into URLs
That's odd - I see they rejected your bugreport. Do they give a reason why?


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 07-16-2011 08:48 PM by leefish.)
07-16-2011 08:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Prevent trailing URL punctuation from being parsed into URLs
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...

My Blog
07-16-2011 10:09 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: