|
Posted by lawrence k on 01/08/06 13:06
Iván Sánchez Ortega wrote:
> 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.
I think you mean, if I understand you right, that I need to use
rawurlencode if I'm going to use a url in an echo statement, but most
of the rest of the time, away from echo statements, I do not have to
sweat much about rawurlencoding, because browsers do so much encoding
automatically?
Navigation:
[Reply to this message]
|