HTTP POST with *

Discussion in 'HTML' started by Ike, Sep 21, 2006.

  1. Ike

    Ike Guest

    If I have a field which I am POSTing, and that field is, say, a mathematical
    expression such as:

    2*8

    must I escap the * somehow? what if it is something like:

    8 / 2

    How can I escape these String values when I POST them, such that the
    subsequent page can retrive the original expression? Thanks, Ike
     
    Ike, Sep 21, 2006
    #1
    1. Advertising

  2. Ike wrote:

    > If I have a field which I am POSTing, and that field is, say, a
    > mathematical expression such as:
    >
    > 2*8
    >
    > must I escap the * somehow?


    The browser will do the necessary escaping (and your form handler has to do
    the unescaping, normally by calling a suitable library subroutine).

    In practice, "*" won't be escaped; it's a "safe" character.

    BTW, 2*8 is just _pseudo_mathematical. In mathematics, the multiplication
    sign is either × or a dot operator, for which we can use the middle dot · as
    a replacement. The notation 2*8 is just computerese from the ASCII era.

    > what if it is something like:
    >
    > 8 / 2


    Similar considerations apply. In practice, the browser will escape "/" as
    "%2F", but you need not worry about this at all. You simply call some
    unescape routine in your form handler.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Sep 21, 2006
    #2
    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. Replies:
    6
    Views:
    5,636
    Tor Iver Wilhelmsen
    Aug 29, 2005
  2. James
    Replies:
    3
    Views:
    16,491
    Roedy Green
    Nov 25, 2005
  3. ColinK
    Replies:
    0
    Views:
    565
    ColinK
    Jul 15, 2007
  4. serge calderara

    HTTP GET vs HTTP POST protocol

    serge calderara, Nov 4, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    623
  5. n3d!m

    Http post and http get

    n3d!m, Jan 25, 2012, in forum: Python
    Replies:
    2
    Views:
    370
    n3d!m
    Feb 6, 2012
Loading...

Share This Page