From 2a67a718eafed2526bbafa3484bd39f885d03013 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Thu, 17 Mar 2011 02:57:20 +0000 Subject: [PATCH] Fix doc bug #54263 (htmlspecialchars - charsets are not equivalent). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@309322 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/strings/functions/htmlspecialchars.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/reference/strings/functions/htmlspecialchars.xml b/reference/strings/functions/htmlspecialchars.xml index 3eeab451c8..cf97aeb83f 100644 --- a/reference/strings/functions/htmlspecialchars.xml +++ b/reference/strings/functions/htmlspecialchars.xml @@ -106,9 +106,10 @@ ISO-8859-1, ISO-8859-15, UTF-8, cp866, cp1251, cp1252, and - KOI8-R are effectively equivalent, as the - characters affected by htmlspecialchars - occupy the same positions in all of these charsets. + KOI8-R are effectively equivalent, provided the + string itself is valid for the character set, as + the characters affected by htmlspecialchars occupy + the same positions in all of these charsets. &reference.strings.charsets; @@ -131,6 +132,12 @@ The converted string. + + If the input string contains an invalid code unit + sequence within the given charset and the + ENT_IGNORE flag is not set, then + htmlspecialchars will return an empty string. +