lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Trimming whitespace


From: Klaus Weide
Subject: Re: lynx-dev Trimming whitespace
Date: Wed, 18 Aug 1999 14:35:43 -0500 (CDT)

On Wed, 18 Aug 1999, Bek Oberin wrote:

> It seems that Lynx trims whitespace from input fields in
> online forms.
> 
> This is causing trouble with my usage of mailman, whose 
> web-based forms include a subject-prefix-entry which I want
> to set to "[listname] " (no quotes).  Is there any way, short
> of recompiling, of turning this option off?

No, there isn't.  However, if you _do_ want to recompile, it should
be very easy to suppress the trailing space removal.  In src/LYForms.c,
comment out or remove the following:

        /*
         *  Remove trailing spaces
         *
         *  Do we really need to do that here?  Trailing spaces will only
         *  be there if user keyed them in.  Rather rude to throw away
         *  their hard earned spaces.  Better deal with trailing spaces
         *  when submitting the form????
         */
        p = &(form->value[strlen(form->value)]);
        while ((p != form->value) && (p[-1] == ' '))
            p--;
        *p = '\0';


As you can see from the comment, somebody else has wondered whether
removing thoses spaces is A Good Thing, but afaik lynx has always
behaved like this (the code, including the comment, goes back to at
least lynx2-4-FM).

There is another point where spaces get removed, but that applies
only to filling in initial text when the HTML has something like
<INPUT ... VALUE="  value  ">.

       Klaus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]