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.
+