|
Posted by Ivαn Sαnchez Ortega on 01/07/06 13:10
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
lawrence k wrote:
> Do most browsers auto encode a form input when it is sent via a GET
> method? Is the encoding standard? It does not break anywhere?
Yes, most browsers do encode form data prior to submitting it. Yes, it is a
standard, as per RFC1738. No, it doesn't usually break.
However, you should be careful about echo()ing URLs with spaces or other
simbols in them, for example:
<?php
$escaped_term = rawurlencode($term);
echo "<a href='search.php?term=$escaped_term'>Repeat search</a>";
?>
In most other cases, you won't need to worry about URL encoding.
- --
- ----------------------------------
IvΓ‘n SΓ‘nchez Ortega -i-punto-sanchez--arroba-mirame-punto-net
Un ordenador no es un televisor ni un microondas, es una herramienta
compleja.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDv6HB3jcQ2mg3Pc8RAhGRAJ0baLUwxzItmsycPRgaX6eaOFqWTQCeIv0J
T/DIPOPuOpRLmDB2v4F+f0g=
=w86i
-----END PGP SIGNATURE-----
Navigation:
[Reply to this message]
|