Doc #69409 [NEW]: urlencode() does not conform to current w3 html5 recommendations
| From: | rainer-phpbugs at 7val dot com | Date: | Thu, 09 Apr 2015 16:35:30 +0000 |
| Subject: | Doc #69409 [NEW]: urlencode() does not conform to current w3 html5 recommendations | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-12126@lists.php.net to get a copy of this message | ||
From: rainer-phpbugs at 7val dot com
Operating system: all
PHP version: 5.6.7
Package: URL related
Bug Type: Documentation Problem
Bug description:urlencode() does not conform to current w3 html5 recommendations
Description:
------------
---
From manual page: http://www.php.net/function.urlencode
---
urlencode() does not conform to then current w3 html5 recommendations
for application/x-www-form-urlencoded data, in that '*' (0x2A) should
be left as is.
http://www.w3.org/TR/html5/forms.html#application/x-www-form-urlencoded-encoding-algorithm
If the byte is in the range 0x2A [...] Leave the byte as is.
rfc3986 would also allow '*' to be left unchangef in the query part of
an URL.
http://tools.ietf.org/html/rfc3986
query = *( pchar / "/" / "?" )
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
sub-delims = "!" / "$" / "&" / "'" /
"(" / ")"
/ "*" / "+" / "," / ";" / "="
Test script:
---------------
<?php
print(urlencode('*'));
Expected result:
----------------
'*' should not be %-encoded, i.e. the test script above should not print
%2A, but the literal '*'.
--
Edit bug report at https://bugs.php.net/bug.php?id=69409&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69409&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69409&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69409&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69409&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69409&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69409&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69409&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69409&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69409&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69409&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69409&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69409&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69409&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69409&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69409&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69409&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69409&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69409&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69409&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69409&r=mysqlcfg