Page 1 of 1

Spaces in posted URLs

Posted: Mon Sep 27, 2010 6:36 pm
by mister-mike
Script URL: http://www.mjq.net/fiveo/gbook/gbook.php
Version of script: 1.7
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: links, url (both ignored); insert, inserting, space,

Write your message below:

I am allowing people to post URLs because we are discussing TV shows, and there are lots of related WWW pages with information relevant to the discussion. I am aware the default is to not allow this and have the anti-spam feature set up so URLs are totally denied.

Spaces are being inserted into the posted URLs as in the following example:

http://{space]trekmovie.com/2010/09/24/shatn{space]ers-sitcom-orci-kurtzman-hawai{space]i-five-0-score-big-ratings-abr{space]ams-undercovers-underperforms/{space]

URLs shortened at http://bit.ly fare better, but I even had one of those which ended up with a space in it.

Is this insertion of spaces something that was done intentionally, or is it a bug? If the former, is it possible to adjust this in the main script so that the spaces are not inserted?

Re: Spaces in posted URLs

Posted: Mon Sep 27, 2010 6:40 pm
by Klemen
It's done deliberately to wrap too long words so they don't stretch the guestbook width. You can remove it by deleting this code form the gbook.php:

Code: Select all

$comments = wordwrap($comments,$settings['max_word'],' ',1);