php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35390 virtual() translates any "&" into "&"
Submitted: 2005-11-25 12:41 UTC Modified: 2005-11-26 06:17 UTC
From: liske at informatik dot hu-berlin dot de Assigned:
Status: Not a bug Package: Apache related
PHP Version: 5.1.0 OS: Linux
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: liske at informatik dot hu-berlin dot de
New email:
PHP Version: OS:

 

 [2005-11-25 12:41 UTC] liske at informatik dot hu-berlin dot de
Description:
------------
Including SSI-files via the virtual()-directive into PHP-scripts causes "&" to result as "&".

Reproduce code:
---------------
in the PHP-Code:
...
  virtual("../header.html.inc?Veröffentlichungen");
...

in the SSI-file located at "../header.html.inc":

<head>
  <title><!--#echo var="QUERY_STRING" --></title>
</head>
...

Expected result:
----------------
I excepted the resulting HTML-page to look like:

<head>
  <title>Ver&ouml;ffentlichungen</title>
</head>
...

Actual result:
--------------
What I get is:

<head>
  <title>Ver&amp;ouml;ffentlichungen</title>
</head>
...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-25 12:42 UTC] tony2001@php.net
This is called "urlencoded" and is expected.
I don't see any bugs here.
 [2005-11-26 06:17 UTC] liske at informatik dot hu-berlin dot de
So any call of virtual("foo.html?p=1&q=2"); will result in a apache-subrequest for "foo.html?p=1&amp;q=2" ? The query string is not the same any more.

It is not "urlencoded":
URL-encoding transforms "&" to "%26" and ";" to "%3B". This is not the case here.

And, Apache does it right:
Within SSI-files the usage of

<!--#include virtual="../header.html.inc?Ver&ouml;ffentlichungen" -->

works fine, as expected.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jun 02 19:01:27 2025 UTC