Spaces in posted URLs

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
mister-mike
Posts: 6
Joined: Mon Sep 27, 2010 6:29 pm

Spaces in posted URLs

Post 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?
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: Spaces in posted URLs

Post 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);
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply