reference/strings/functions/htmlspecialchars-decode.xml
eabde0419cf90f596f60db00e31fcb6ebe41ac55
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.htmlspecialchars-decode">
3
+
<refentry xml:id="function.htmlspecialchars-decode" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>htmlspecialchars_decode</refname>
6
6
<refpurpose>
...
...
@@ -12,7 +12,7 @@
12
12
<methodsynopsis>
13
13
<type>string</type><methodname>htmlspecialchars_decode</methodname>
14
14
<methodparam><type>string</type><parameter>string</parameter></methodparam>
15
-
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_COMPAT | ENT_HTML401</initializer></methodparam>
15
+
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401</initializer></methodparam>
16
16
</methodsynopsis>
17
17

18
18
<para>
...
...
@@ -44,7 +44,7 @@
44
44
<listitem>
45
45
<para>
46
46
A bitmask of one or more of the following flags, which specify how to handle quotes and
47
-
which document type to use. The default is <literal>ENT_COMPAT | ENT_HTML401</literal>.
47
+
which document type to use. The default is <literal>ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401</literal>.
48
48
<table>
49
49
<title>Available <parameter>flags</parameter> constants</title>
50
50
<tgroup cols="2">
...
...
@@ -68,6 +68,13 @@
68
68
<entry>Will leave both double and single quotes unconverted.</entry>
69
69
</row>
70
70
<row>
71
+
<entry><constant>ENT_SUBSTITUTE</constant></entry>
72
+
<entry>
73
+
Replace invalid code unit sequences with a Unicode Replacement Character
74
+
U+FFFD (UTF-8) or &amp;#xFFFD; (otherwise) instead of returning an empty string.
75
+
</entry>
76
+
</row>
77
+
<row>
71
78
<entry><constant>ENT_HTML401</constant></entry>
72
79
<entry>
73
80
Handle code as HTML 4.01.
...
...
@@ -110,27 +117,24 @@
110
117

111
118
<refsect1 role="changelog">
112
119
&reftitle.changelog;
113
-
<para>
114
-
<informaltable>
115
-
<tgroup cols="2">
116
-
<thead>
117
-
<row>
118
-
<entry>&Version;</entry>
119
-
<entry>&Description;</entry>
120
-
</row>
121
-
</thead>
122
-
<tbody>
123
-
<row>
124
-
<entry>5.4.0</entry>
125
-
<entry>
126
-
The constants <constant>ENT_HTML401</constant>, <constant>ENT_XML1</constant>,
127
-
<constant>ENT_XHTML</constant> and <constant>ENT_HTML5</constant> were added.
128
-
</entry>
129
-
</row>
130
-
</tbody>
131
-
</tgroup>
132
-
</informaltable>
133
-
</para>
120
+
<informaltable>
121
+
<tgroup cols="2">
122
+
<thead>
123
+
<row>
124
+
<entry>&Version;</entry>
125
+
<entry>&Description;</entry>
126
+
</row>
127
+
</thead>
128
+
<tbody>
129
+
<row>
130
+
<entry>8.1.0</entry>
131
+
<entry>
132
+
<parameter>flags</parameter> changed from <constant>ENT_COMPAT</constant> to <constant>ENT_QUOTES</constant> | <constant>ENT_SUBSTITUTE</constant> | <constant>ENT_HTML401</constant>.
133
+
</entry>
134
+
</row>
135
+
</tbody>
136
+
</tgroup>
137
+
</informaltable>
134
138
</refsect1>
135
139

136
140
<refsect1 role="examples">
...
...
@@ -172,7 +176,6 @@ echo htmlspecialchars_decode($str, ENT_NOQUOTES);
172
176
</para>
173
177
</refsect1>
174
178
</refentry>
175
-

176
179
<!-- Keep this comment at the end of the file
177
180
Local variables:
178
181
mode: sgml
179
182