Updated to reflect RFC 3986, as per bug #53187.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@305134 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Justin Martin 2010-11-06 19:12:47 +00:00
parent 82b58eb34a
commit a9a3ae6d6e

View file

@ -3,7 +3,7 @@
<refentry xml:id="function.rawurlencode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>rawurlencode</refname>
<refpurpose>URL-encode according to RFC 1738</refpurpose>
<refpurpose>URL-encode according to RFC 3986</refpurpose>
</refnamediv>
<refsect1 role="description">
@ -14,7 +14,7 @@
</methodsynopsis>
<para>
Encodes the given string according to <link
xlink:href="&url.rfc;1738">RFC 1738</link>.
xlink:href="&url.rfc;3986">RFC 3986</link>.
</para>
</refsect1>
@ -38,12 +38,42 @@
&reftitle.returnvalues;
<para>
Returns a string in which all non-alphanumeric characters except
<literal>-_.</literal> have been replaced with a percent
<literal>-_.~</literal> have been replaced with a percent
(<literal>%</literal>) sign followed by two hex digits. This is the
encoding described in <link xlink:href="&url.rfc;1738">RFC 1738</link> for
encoding described in <link xlink:href="&url.rfc;3986">RFC 3986</link> for
protecting literal characters from being interpreted as special URL
delimiters, and for protecting URLs from being mangled by transmission
media with character conversions (like some email systems).
media with character conversions (like some email systems).
<note>
<para>
Prior to PHP 5.3.0, rawurlencode encoded tildes (<literal>~</literal>) as per
<link xlink:href="&url.rfc;1738">RFC 1738</link>.
</para>
</note>
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.3.0</entry>
<entry>
Now conforms to <link xlink:href="&url.rfc;3986">RFC 3986</link>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
@ -99,7 +129,7 @@ echo '<a href="http://example.com/department_list_script/',
<member><function>rawurldecode</function></member>
<member><function>urldecode</function></member>
<member><function>urlencode</function></member>
<member><link xlink:href="&url.rfc;1738">RFC 1738</link></member>
<member><link xlink:href="&url.rfc;3986">RFC 3986</link></member>
</simplelist>
</para>
</refsect1>