Welcome to WebmasterWorld Guest from

Forum Moderators: lawman

Message Too Old, No Replies

Spaces in code listings?

12:39 pm on Apr 3, 2001 (gmt 0)

Administrator from US 

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 21, 1999
votes: 12

>Why can't I get leading spaces in posts
>that use the "code" or "pre" commands?

The question has come up a few times before, so I thought I'd answer here.

It was a tough call to make. There are browsers that will feed all kinds of spaces with a text area. Even Netscape can feed unnecessary spaces. After doing this for awhile, you'll find browsers that will fed all sorts of unnecessary stuff in a textarea.

I've also found that almost every single post will include at least one occurrence of a double or triple space where it isn't required. Take that times 50k messages at the moment.

When I put in the leading space stripper, I went back through old posts with a routine to strip out spaces. At the time there was 4-5k posts, and the routine reclaimed close to half of meg, just from spaces.

Also, remember there are a) people who'd exploit the feature in ways you'd never expect and b) the board also has a option for html posting that is currently turned off. Those two factors are a new degree of difficulty in dealing with text area inputs.

I am working on a upgrade to the board software. I will be exploring special exceptions for (code) and (pre).


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members