From 6773d9e51a4f267aefac2c01123c3a487b41959b Mon Sep 17 00:00:00 2001 From: Friedhelm Betz Date: Mon, 3 Mar 2003 18:03:13 +0000 Subject: [PATCH] fix for bug #21592, list of supported charsets added git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@118785 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/strings/functions/html-entity-decode.xml | 7 ++++--- reference/strings/functions/htmlentities.xml | 11 ++++++----- reference/strings/functions/htmlspecialchars.xml | 12 ++++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/reference/strings/functions/html-entity-decode.xml b/reference/strings/functions/html-entity-decode.xml index 6f2561bc7f..cb81678cdc 100644 --- a/reference/strings/functions/html-entity-decode.xml +++ b/reference/strings/functions/html-entity-decode.xml @@ -1,5 +1,5 @@ - + @@ -54,9 +54,10 @@ The ISO-8859-1 character set is used as default for the optional third - charset. This defines the character set used in - conversion. + charset. This defines the character set used in + conversion. Support for this third argument was added in PHP 4.1.0. + &reference.strings.charsets; Decoding html entities diff --git a/reference/strings/functions/htmlentities.xml b/reference/strings/functions/htmlentities.xml index 48ed2ee646..ff35645eaf 100644 --- a/reference/strings/functions/htmlentities.xml +++ b/reference/strings/functions/htmlentities.xml @@ -1,5 +1,5 @@ - + @@ -54,15 +54,16 @@ - Support for the optional quote parameter was + Support for the optional quote parameter was added in PHP 4.0.3. Like htmlspecialchars, it takes an optional - third argument which defines character set used in conversion. - Support for this argument was added in PHP 4.1.0. Presently, the - ISO-8859-1 character set is used as the default. + third argument charset which defines character + set used in conversion. Support for this argument was added in PHP 4.1.0. + Presently, the ISO-8859-1 character set is used as the default. + &reference.strings.charsets; If you're wanting to decode instead (the reverse) you can use html_entity_decode. diff --git a/reference/strings/functions/htmlspecialchars.xml b/reference/strings/functions/htmlspecialchars.xml index da5a1117db..6efeb6859c 100644 --- a/reference/strings/functions/htmlspecialchars.xml +++ b/reference/strings/functions/htmlspecialchars.xml @@ -1,5 +1,5 @@ - + @@ -71,7 +71,10 @@ <function>htmlspecialchars</function> example Test", ENT_QUOTES); +echo $new; // <a href='test'>Test</a> +?> ]]> @@ -83,10 +86,11 @@ $new = htmlspecialchars("Test", ENT_QUOTES); second argument was added in PHP 3.0.17 and PHP 4.0.3. - The third argument defines character set used in conversion. The - default character set is ISO-8859-1. Support for this third argument was - added in PHP 4.1.0. + The third argument charset defines character set + used in conversion. The default character set is ISO-8859-1. Support for + this third argument was added in PHP 4.1.0. + &reference.strings.charsets; See also get_html_translation_table, htmlentities, and nl2br.