Bug report: ClientForm

Discussion in 'Python' started by Muddy Coder, Feb 28, 2009.

  1. Muddy Coder

    Muddy Coder Guest

    Hi Folks,

    As directed, I got ClientForm and played with it. It is cool! However,
    I also found a bug:

    When it parses a form, if the VALUE of a field has not space, it works
    very well. For example, if a dropdown list, there many options, such
    as:

    <option value=foo> ....

    the value foo will be picked up for sure. But, if there is a space:

    <option value=foo bar> .....

    The *bar* will be missed out. I wish this bug can be fixed in near
    future.

    By the way, can somebody helps me on setting parameter of uploading a
    file. In ClientForm, if I need to upload a text file, I can do it by:

    form.add_file(..., "text/plain")

    What about a picture file? What is the counterpart of 'text/plain"?
    Thanks!

    Muddy Coder
     
    Muddy Coder, Feb 28, 2009
    #1
    1. Advertising

  2. Muddy Coder

    MRAB Guest

    Muddy Coder wrote:
    > Hi Folks,
    >
    > As directed, I got ClientForm and played with it. It is cool! However,
    > I also found a bug:
    >
    > When it parses a form, if the VALUE of a field has not space, it works
    > very well. For example, if a dropdown list, there many options, such
    > as:
    >
    > <option value=foo> ....
    >
    > the value foo will be picked up for sure. But, if there is a space:
    >
    > <option value=foo bar> .....
    >

    Values should be quoted, although you can omit the quotes if there
    aren't any spaces in the string:

    <option value="foo bar">

    You can see examples at http://wwwsearch.sourceforge.net/ClientForm/

    <input type="checkbox" name="control2" value="foo" id="cbe1">

    As you can see, whitespace separates the name=value pairs.

    > The *bar* will be missed out. I wish this bug can be fixed in near
    > future.
    >

    It's not a bug.
     
    MRAB, Feb 28, 2009
    #2
    1. Advertising

  3. En Sat, 28 Feb 2009 21:01:56 -0200, Muddy Coder <>
    escribió:

    > By the way, can somebody helps me on setting parameter of uploading a
    > file. In ClientForm, if I need to upload a text file, I can do it by:
    >
    > form.add_file(..., "text/plain")
    >
    > What about a picture file? What is the counterpart of 'text/plain"?


    See http://www.iana.org/assignments/media-types/image/

    --
    Gabriel Genellina
     
    Gabriel Genellina, Feb 28, 2009
    #3
  4. Muddy Coder

    Lie Ryan Guest

    MRAB wrote:
    > Muddy Coder wrote:
    >> Hi Folks,
    >>
    >> When it parses a form, if the VALUE of a field has not space, it works
    >> very well. For example, if a dropdown list, there many options, such
    >> as:
    >>
    >> <option value=foo> ....
    >>
    >> the value foo will be picked up for sure. But, if there is a space:
    >>
    >> <option value=foo bar> .....
    >>

    > Values should be quoted, although you can omit the quotes if there
    > aren't any spaces in the string:
    >
    > <option value="foo bar">
    >
    > You can see examples at http://wwwsearch.sourceforge.net/ClientForm/
    >
    > <input type="checkbox" name="control2" value="foo" id="cbe1">
    >
    > As you can see, whitespace separates the name=value pairs.


    It is also a good habit to have the quotes even when you don't use
    spaces. Also, knowledge of xHTML in general should come in handy.
     
    Lie Ryan, Mar 1, 2009
    #4
  5. Muddy Coder

    Lie Ryan Guest

    MRAB wrote:
    > Muddy Coder wrote:
    >> Hi Folks,
    >>
    >> When it parses a form, if the VALUE of a field has not space, it works
    >> very well. For example, if a dropdown list, there many options, such
    >> as:
    >>
    >> <option value=foo> ....
    >>
    >> the value foo will be picked up for sure. But, if there is a space:
    >>
    >> <option value=foo bar> .....
    >>

    > Values should be quoted, although you can omit the quotes if there
    > aren't any spaces in the string:
    >
    > <option value="foo bar">
    >
    > You can see examples at http://wwwsearch.sourceforge.net/ClientForm/
    >
    > <input type="checkbox" name="control2" value="foo" id="cbe1">
    >
    > As you can see, whitespace separates the name=value pairs.


    It is also a good habit to have the quotes even when you don't use
    spaces. Also, knowledge of xHTML in general should come in handy.
     
    Lie Ryan, Mar 1, 2009
    #5
  6. Muddy Coder

    Steve Holden Guest

    MRAB wrote:
    > Muddy Coder wrote:
    >> Hi Folks,
    >>
    >> As directed, I got ClientForm and played with it. It is cool! However,
    >> I also found a bug:
    >>
    >> When it parses a form, if the VALUE of a field has not space, it works
    >> very well. For example, if a dropdown list, there many options, such
    >> as:
    >>
    >> <option value=foo> ....
    >>
    >> the value foo will be picked up for sure. But, if there is a space:
    >>
    >> <option value=foo bar> .....
    >>

    > Values should be quoted, although you can omit the quotes if there
    > aren't any spaces in the string:
    >
    > <option value="foo bar">
    >
    > You can see examples at http://wwwsearch.sourceforge.net/ClientForm/
    >
    > <input type="checkbox" name="control2" value="foo" id="cbe1">
    >
    > As you can see, whitespace separates the name=value pairs.
    >
    >> The *bar* will be missed out. I wish this bug can be fixed in near
    >> future.
    >>

    > It's not a bug.


    Or, if it is, it's a bug in the web page, not ClientForm!

    regards
    Steve
    --
    Steve Holden +1 571 484 6266 +1 800 494 3119
    Holden Web LLC http://www.holdenweb.com/
     
    Steve Holden, Mar 1, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matej Cepl

    Seekable output from ClientForm?

    Matej Cepl, Feb 9, 2005, in forum: Python
    Replies:
    2
    Views:
    434
  2. narke

    A ClientForm Question

    narke, Apr 1, 2005, in forum: Python
    Replies:
    5
    Views:
    536
    John J. Lee
    Apr 6, 2005
  3. kostem

    ClientForm question

    kostem, May 23, 2005, in forum: Python
    Replies:
    0
    Views:
    283
    kostem
    May 23, 2005
  4. m0sf3t

    A Clientform question

    m0sf3t, May 24, 2005, in forum: Python
    Replies:
    0
    Views:
    324
    m0sf3t
    May 24, 2005
  5. John J Lee
    Replies:
    4
    Views:
    381
    John J. Lee
    Mar 23, 2006
Loading...

Share This Page