php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54486 QUERY_STRING
Submitted: 2011-04-07 15:36 UTC Modified: 2011-04-07 16:30 UTC
From: vittorisimone at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: Irrelevant OS: windows xp
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vittorisimone at gmail dot com
New email:
PHP Version: OS:

 

 [2011-04-07 15:36 UTC] vittorisimone at gmail dot com
Description:
------------
Hi, there's a problem with

$_SERVER['QUERY_STRING'];

this returns a string with unencoded ampersands; that's not good, because the "&" is used to create entities and may cause bugs.
I need to escape all instances of '&' into '&', according to W3C standards. Hope this will be fixed soon.

Test script:
---------------
<?php echo "?". $_SERVER['QUERY_STRING'] . "&amp;copy=".$testi[0]; ?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-07 16:30 UTC] dtajchreber@php.net
-Status: Open +Status: Bogus
 [2011-04-07 16:30 UTC] dtajchreber@php.net
php.net/htmlspecialchars
php.net/htmlentities
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 02:01:32 2025 UTC