Jump to content

urlencode question


willaguila

Recommended Posts

I'm testing urlencode to code the characters below and in the source produced by the page it is encoded correctly,

but when I click the made up link I get this in my url: http://localhost/php_sandbox/"bad"22%2F<>character%24 :wtf:

As you can see the "" and <> are not encoded, any idea why this happens?

Using Apache 2

php 5.2.9

 

 

 

<?php

$param2 = '"bad"/<>character$';

 

$test = urlencode($param2);

?>

 

<br/> <a href="<?php echo htmlspecialchars($test); ?>" >test</a>

 

Link to comment
https://forums.phpfreaks.com/topic/166661-urlencode-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.