Dear Fellow Monks,
I have this bunch of Perl-scripts which together make a nice dynamic website.
Now, for various reasons I must place in a web-page an href-link to another script. This other script expects to receive a number of parameters through the GET-protocol, which I therefore encode into the URL put into the href.
Say that the href turns out to be href='script.pl?company=IBM&place=Brussels'. This works nice and fine: script.pl happily obtains both parameters (thanks to CGI.pm of course) and outputs another dynamic webpage.
Now it comes to pass that the name of the company is "Smith & Jones" and the href becomes href='script.pl?company=Smith & Jones&place=Brussels'.
All of a sudden, script.pl sees only "Smith " in the company -parameter and a third parameter "Jones" pops into being.
Obviously the "&" between "Smith" and "Jones" was seen to be a delimiter, rather than part of the company-parameter.
Vainly I tried to find a way to escape this "&": All to no avail, CGI.pm seems to unescape all "&"-entities prior to parsing the URL for the GET-parameters.
I looked through the CGI-docs but could not find a solution.
Does anyone has a suggestion how to sneak in an "&" into a GET-parameter?
Although I do not think it has anything to do with this problem, I mention that my scripts do not directly output HTML, but XML which get server-side transformed into HTML by XSLT.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to CGI : How to put an "&" into a GET-parameter by CountZero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |