Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
0 registered members (), 59 guests, and 388 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Ruben
Ruben
Lutz,FL
Posts: 5,825
Joined: December 2003
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 16
M4TT 11
FREAK 11
Ruben 6
mmkk 5
isaac 4
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
[FIXED for 7.5] URL link detection #221875
02/02/09 12:27 PM
02/02/09 12:27 PM
Joined: Aug 2007
Posts: 45
M
MichaelM Offline OP
newbie
MichaelM  Offline OP
newbie
M
Joined: Aug 2007
Posts: 45
Hello,

When posting the following link

http://i447.photobucket.com/albums/qq191/yvonne112/Cocos%20pics/DSC01095.jpg

the post does not recognize it as a link in the message.

Is this a bug?

Thanks,
Mike

Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: URL link detection [Re: MichaelM] #221890
02/02/09 01:36 PM
02/02/09 01:36 PM
Joined: Jun 2006
Posts: 16,786
Portland, OR; USA
Gizmo Offline
UBB.threads Developer
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,786
Portland, OR; USA
I think the regex is choking on the % sign


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: URL link detection [Re: Gizmo] #221928
02/02/09 08:08 PM
02/02/09 08:08 PM
Joined: Feb 2007
Posts: 1,318
Pennsylvania
JAISP Offline
veteran
JAISP  Offline
veteran
Joined: Feb 2007
Posts: 1,318
Pennsylvania
%20 is a space to a Linux server running Apache.

Best never to use direct spaces in anything web related but rather an underscore for spaces.

"web_space" rather then "web space".

Re: URL link detection [Re: JAISP] #221929
02/02/09 11:36 PM
02/02/09 11:36 PM
Joined: Apr 2007
Posts: 4,313
SoCal, USA
SD Offline
Carpal Tunnel
SD  Offline
Carpal Tunnel
Joined: Apr 2007
Posts: 4,313
SoCal, USA
that's a good 'practice' Thelockman-UNiT, but you'll never get members to adhere to that rule all the time..

the regex (bbcode.inc.php) could (should) be updated to handle it... 2c

oh and %20 is space for ANY url.. it's nothing to do with apache and linux.. %20 loves IIS / doze too and is just how url encoding works.. %20 (hex 20) is decimal 32, which is ascii number for space .. smile

Re: URL link detection [Re: SD] #221931
02/02/09 11:42 PM
02/02/09 11:42 PM
Joined: Jun 2006
Posts: 1,475
NY
G
gliderdad Offline
veteran
gliderdad  Offline
veteran
G
Joined: Jun 2006
Posts: 1,475
NY
My members complained about it to. They couldn't grasp that the should name folder in photobucket without a space and use an underscore.

Told them if they want it to work, best change that folder name :X

Re: URL link detection [Re: gliderdad] #221933
02/02/09 11:52 PM
02/02/09 11:52 PM
Joined: Apr 2007
Posts: 4,313
SoCal, USA
SD Offline
Carpal Tunnel
SD  Offline
Carpal Tunnel
Joined: Apr 2007
Posts: 4,313
SoCal, USA
yah, i personally NEVER use spaces in URL's and typically use underscores _ instead... it's 'natural' to me, but assuming it's natural for everyone else, doesn't work laugh

Re: URL link detection [Re: SD] #221934
02/03/09 12:04 AM
02/03/09 12:04 AM
Joined: Jun 2006
Posts: 1,475
NY
G
gliderdad Offline
veteran
gliderdad  Offline
veteran
G
Joined: Jun 2006
Posts: 1,475
NY
LOL, yes you are right. Assumptions are the mother of all....you know what! All we can do is steer them in the right direction.

Re: URL link detection [Re: gliderdad] #221935
02/03/09 12:24 AM
02/03/09 12:24 AM
Joined: Aug 2007
Posts: 45
M
MichaelM Offline OP
newbie
MichaelM  Offline OP
newbie
M
Joined: Aug 2007
Posts: 45
I never uses spaces in URLs. But that isn't the case for the members of our message board. Even still if %20 is a legitimate sequence in a URL then I would think UBB Threads should support it.

Re: URL link detection [Re: MichaelM] #221936
02/03/09 01:15 AM
02/03/09 01:15 AM
Joined: Apr 2007
Posts: 4,313
SoCal, USA
SD Offline
Carpal Tunnel
SD  Offline
Carpal Tunnel
Joined: Apr 2007
Posts: 4,313
SoCal, USA
yeppers smile

Re: URL link detection [Re: SD] #221937
02/03/09 03:09 AM
02/03/09 03:09 AM
Joined: Jun 2006
Posts: 1,475
NY
G
gliderdad Offline
veteran
gliderdad  Offline
veteran
G
Joined: Jun 2006
Posts: 1,475
NY
It use to work that way prior to 7.4.1 I think

Re: URL link detection [Re: gliderdad] #221945
02/03/09 11:19 AM
02/03/09 11:19 AM
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
R
Rick Offline
Former Developer
Rick  Offline
Former Developer
R
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
I have this fixed for 7.5.

Re: URL link detection [Re: Rick] #222278
02/12/09 06:41 AM
02/12/09 06:41 AM
Joined: Dec 2003
Posts: 117
Belgium
K
Kayjey Offline

member
Kayjey  Offline

member
K
Joined: Dec 2003
Posts: 117
Belgium
Can someone give me the fix code?

Re: URL link detection [Re: Kayjey] #222326
02/13/09 05:33 AM
02/13/09 05:33 AM
Joined: Dec 2003
Posts: 117
Belgium
K
Kayjey Offline

member
Kayjey  Offline

member
K
Joined: Dec 2003
Posts: 117
Belgium
Okay... I actually didn't know anything about regex (they're REALLY Chinese for me), but after going through some documentation, I would presume the fix to be like this:

In "libs" / "bbcode.inc.php" change:

Code


$body = preg_replace('#(\n|\r|\]|^|\s|\(|<)([a-zA-Z0-9]+?)://(([a-zA-Z0-9\.\-\_\?=\#/&]|&)+)(>|<|\n|\r|$|,(\s|$)|\?(\s|$)|\)|\s|\.(\s|$))#ie', '\'$1\'.$this->handle_url(\'$2://$3\').\'$5\'', $body);




into
Code


$body = preg_replace('#(\n|\r|\]|^|\s|\(|<)([a-zA-Z0-9]+?)://(([a-zA-Z0-9\.\-\_\?=\#/&]|&|[\+\%])+)(>|<|\n|\r|$|,(\s|$)|\?(\s|$)|\)|\s|\.(\s|$))#ie', '\'$1\'.$this->handle_url(\'$2://$3\').\'$5\'', $body);




and

Code


$body = preg_replace('#(\n|\r|\]|^|\s|<|\()www\.(([a-zA-Z0-9\.\-\_\?&/\#=]|&)+)($|>|\)|,(\s|$)|\?(\s|$)|\)(\s|$)|\s|\.(\s|$))#ie', '\'$1\'.$this->handle_url(\'http://www.$2\',\'www.$2\').\'$4\'', $body);




into

Code


$body = preg_replace('#(\n|\r|\]|^|\s|<|\()www\.(([a-zA-Z0-9\.\-\_\?&/\#=]|&|[\+\%])+)($|>|\)|,(\s|$)|\?(\s|$)|\)(\s|$)|\s|\.(\s|$))#ie', '\'$1\'.$this->handle_url(\'http://www.$2\',\'www.$2\').\'$4\'', $body);



basically adding "|[\+\%]" after the "amp;" to include plus and percent signs.

Re: URL link detection [Re: Kayjey] #222423
02/15/09 07:21 AM
02/15/09 07:21 AM
Joined: Aug 2006
Posts: 1,530
Breda, NL
Yarp™ Offline
veteran
Yarp™  Offline
veteran
Joined: Aug 2006
Posts: 1,530
Breda, NL
Originally Posted by Kayjey
Okay... I actually didn't know anything about regex (they're REALLY Chinese for me), but after going through some documentation, I would presume the fix to be like this:


If you ever want to learn chinese, RegexBuddy could be your new best friend!


[Linked Image]
Re: URL link detection [Re: Yarp™] #222428
02/15/09 12:44 PM
02/15/09 12:44 PM
Joined: Apr 2007
Posts: 4,313
SoCal, USA
SD Offline
Carpal Tunnel
SD  Offline
Carpal Tunnel
Joined: Apr 2007
Posts: 4,313
SoCal, USA
RegexBuddy [Linked Image]


Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Users Unable to Upload Avatar
by M4TT. 12/13/17 08:51 AM
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
Forum Statistics
Forums36
Topics35,015
Posts190,536
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)