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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 22:01:28 2024 UTC