[Mapbender-users] Usemap

Marc Jansen jansen.marc at gmx.de
Tue Dec 12 06:54:04 EST 2006


Hi Pieter,

/javascripts/mod_usemap.php & /php/mod_usemap.php

Pieter Deckers schrieb:
> Thanks Till,
>
> the hint for unhiding the iframe was very usefull. Unless it didn't display the link I could solve the problem.
>
> But I had to change therefore the source code. I changed line 29:
> $url = urldecode($_REQUEST["url"]);
> in
> $url = "url"
> and then it was working fine.
>   
To me it is at least very surprising. In /javascripts/mod_usemap.php the 
url is escaped using JavaScript, meaning all specialchars and 
control-characters are converted to hexadecimal number values with a 
leading %-character. In the file /php/mod_usemap.php this process is 
reverted using the php-function urldecode. This should work... or am I 
missing something? Maybe the url should be encoded using |the 
encodeURIComponent()-function instead of the escape()-function within 
the JavaScript-file. I'll send a copy of this mail| to the dev-list as 
well, as this might be a problem that should be discussed there, too.

Pieter, could you please post the generated HTML source (!) code  of 
this example using your values?

$before_decoding = $_REQUEST["url"];
$after_decoding = urldecode($_REQUEST["url"]);

echo "Not decoded: " $before_encoding . "<br />\n decoded: " . $after_encoding;

It would be interesting to me what broke the script in your case... 

Thanks in advance


> I don't know if this is an error in the code or a wrong setting of me.
>
>   
I don't know, either. Lets have the dev-list look at this...
> Cheers,
>
> Pieter
>
>   
-- Marc





More information about the Mapbender_dev mailing list