HTTP POST with *

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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


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

Re: HTTP POST with *

Ike wrote:

Quoted text here. Click to load it

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.

Quoted text here. Click to load it

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")

Site Timeline