|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
I think the regex is choking on the % sign
|
|
|
|
Joined: Feb 2007
Posts: 1,294 Likes: 2
Veteran
|
Veteran
Joined: Feb 2007
Posts: 1,294 Likes: 2 |
%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".
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
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... 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 ..
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
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
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
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
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
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.
|
|
|
|
Joined: Aug 2007
Posts: 45
newbie
|
newbie
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.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
yeppers
|
|
|
|
Joined: Jun 2006
Posts: 1,344
veteran
|
veteran
Joined: Jun 2006
Posts: 1,344 |
It use to work that way prior to 7.4.1 I think
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
I have this fixed for 7.5.
|
|
|
|
Joined: Dec 2003
Posts: 117
Member
|
Member
Joined: Dec 2003
Posts: 117 |
Can someone give me the fix code?
|
|
|
|
Joined: Dec 2003
Posts: 117
Member
|
Member
Joined: Dec 2003
Posts: 117 |
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:
$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
$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
$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
$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.
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
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!
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
RegexBuddy
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
1 members (Geoff),
1,018
guests, and
215
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|