svn: /phpdoc/en/trunk/reference/strings/functions/ htmlentities.xml htmlspecialchars.xml

From: Date: Fri, 27 Jan 2012 10:00:18 +0000
Subject: svn: /phpdoc/en/trunk/reference/strings/functions/ htmlentities.xml htmlspecialchars.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9499@lists.php.net to get a copy of this message
aharvey Fri, 27 Jan 2012 10:00:18 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=322842 Log: Fix doc bug #60884 (htmlentities() behaves differently and thus breaks existing code) by clarifying the new behaviour in PHP 5.4.0. Bug: https://bugs.php.net/60884 (Re-Opened) htmlentities() behaves differently and thus breaks existing code Changed paths: U phpdoc/en/trunk/reference/strings/functions/htmlentities.xml U phpdoc/en/trunk/reference/strings/functions/htmlspecialchars.xml Modified: phpdoc/en/trunk/reference/strings/functions/htmlentities.xml =================================================================== --- phpdoc/en/trunk/reference/strings/functions/htmlentities.xml 2012-01-27 09:36:01 UTC (rev 322841) +++ phpdoc/en/trunk/reference/strings/functions/htmlentities.xml 2012-01-27 10:00:18 UTC (rev 322842) @@ -123,12 +123,14 @@ <term><parameter>charset</parameter></term> <listitem> <para> - Like <function>htmlspecialchars</function>, it takes an optional - third argument <parameter>charset</parameter> which defines character - set used in conversion. - Presently, the ISO-8859-1 character set is used as the default. - However, this default is very likely to change in future versions of - PHP; the programmer is highly encouraged to specify a value. + Like <function>htmlspecialchars</function>, + <function>htmlentities</function> takes an optional third argument + <parameter>charset</parameter> which defines character set used in + conversion. + If omitted, the default value for this argument is ISO-8859-1 in + versions of PHP prior to 5.4.0, and UTF-8 from PHP 5.4.0 onwards. + Although this argument is technically optional, you are highly + encouraged to specify the correct value for your code. </para> &reference.strings.charsets; </listitem> @@ -168,6 +170,13 @@ <row> <entry>5.4.0</entry> <entry> + The default value for the <parameter>charset</parameter> parameter was + changed to UTF-8. + </entry> + </row> + <row> + <entry>5.4.0</entry> + <entry> The constants <constant>ENT_SUBSTITUTE</constant>, <constant>ENT_DISALLOWED</constant>, <constant>ENT_HTML401</constant>, <constant>ENT_XML1</constant>, <constant>ENT_XHTML</constant> and <constant>ENT_HTML5</constant> were added. Modified: phpdoc/en/trunk/reference/strings/functions/htmlspecialchars.xml =================================================================== --- phpdoc/en/trunk/reference/strings/functions/htmlspecialchars.xml 2012-01-27 09:36:01 UTC (rev 322841) +++ phpdoc/en/trunk/reference/strings/functions/htmlspecialchars.xml 2012-01-27 10:00:18 UTC (rev 322842) @@ -161,7 +161,8 @@ <listitem> <para> Defines character set used in conversion. - The default character set is ISO-8859-1. + If omitted, the default value for this argument is ISO-8859-1 in + versions of PHP prior to 5.4.0, and UTF-8 from PHP 5.4.0 onwards. </para> <para> For the purposes of this function, the charsets @@ -217,6 +218,13 @@ <row> <entry>5.4.0</entry> <entry> + The default value for the <parameter>charset</parameter> parameter was + changed to UTF-8. + </entry> + </row> + <row> + <entry>5.4.0</entry> + <entry> The constants <constant>ENT_SUBSTITUTE</constant>, <constant>ENT_DISALLOWED</constant>, <constant>ENT_HTML401</constant>, <constant>ENT_XML1</constant>, <constant>ENT_XHTML</constant> and <constant>ENT_HTML5</constant> were added.

« previous php.doc.cvs (#9499) next »