There is an dummy example PHP application which shows what causes me problems.
<?PHP
echo ((isset($_GET['P'])) ? print_r($_GET) : "<a href='http://example.com/a.php?P=" . urlencode('One & Two') . "'>One & Two</a>");
?>
If we visit page without P parameter page will output:
http://example.com/One+%26+Two
And that's fine, but if we visit the link, script will return:
Array
(
[P] => One
[Two] =>
)
And that's obviously WRONG.
In real application, in url is submitted about 30 char long alphanumeric string which contains special letters(Swedish).
Edit: In my real application I use URL rewrite:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ ../example.php?s=$1 [L,QSA]
</IfModule>
Can that be the cause? - Confirmed. It was the issue. See my answer below.
You need to send your URL using the
%
to escape the ampersand. Try it like this'One %26 Two'