You are here: Re: Valid characters in GET data « HTML « IT news, forums, messages
Re: Valid characters in GET data

Posted by Toby A Inkster on 12/20/07 16:42

David Segall wrote:

> I want to encode a string that will be used as a GET data parameter but
> the algorithm I have can produce the characters "/", "+" and "=" in
> addition to alphanumeric characters. Those characters don't have a named
> entity in my HTML text book so I believe they can be used without
> further encoding.

Wrong. All three have special meanings in form data, so although a URL
like "http://example.com?myparam=four/two+3=5" is perfectly valid, your
webserver and/or scripting language may interpret it differently to how
you might expect.

For example, the '+' may be decoded to a space character before you get
your hands on it.

URLs such as this would typically need to be hex-encoded to avoid being
interpreted:

http://example.com?myparam=four%2Ftwo%2B3%3D5

- and * would probably be safer than + and /. < or > would be safer than =.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 13 days, 3:12.]

Sharing Music with Apple iTunes
http://tobyinkster.co.uk/blog/2007/11/28/itunes-sharing/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация