reference/strings/functions/htmlspecialchars.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" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+
<refentry xml:id="function.htmlspecialchars" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
4
4
<refnamediv>
5
5
<refname>htmlspecialchars</refname>
6
6
<refpurpose>Convert special characters to HTML entities</refpurpose>
...
...
@@ -11,8 +11,8 @@
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>htmlspecialchars</methodname>
13
13
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_COMPAT | ENT_HTML401</initializer></methodparam>
15
-
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>ini_get("default_charset")</initializer></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401</initializer></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
16
16
<methodparam choice="opt"><type>bool</type><parameter>double_encode</parameter><initializer>&true;</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
...
...
@@ -53,7 +53,7 @@
53
53
<entry><literal>&amp;quot;</literal>, unless <constant>ENT_NOQUOTES</constant> is set</entry>
54
54
</row>
55
55
<row>
56
-
<entry><literal>&#039;</literal> (single quote)</entry>
56
+
<entry><literal>'</literal> (single quote)</entry>
57
57
<entry>
58
58
<literal>&amp;#039;</literal> (for <constant>ENT_HTML401</constant>) or <literal>&amp;apos;</literal> (for
59
59
<constant>ENT_XML1</constant>, <constant>ENT_XHTML</constant> or
...
...
@@ -93,7 +93,7 @@
93
93
<para>
94
94
A bitmask of one or more of the following flags, which specify how to handle quotes,
95
95
invalid code unit sequences and the used document type. The default is
96
-
<literal>ENT_COMPAT | ENT_HTML401</literal>.
96
+
<literal>ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401</literal>.
97
97
<table>
98
98
<title>Available <parameter>flags</parameter> constants</title>
99
99
<tgroup cols="2">
...
...
@@ -216,48 +216,24 @@
216
216

217
217
<refsect1 role="changelog">
218
218
&reftitle.changelog;
219
-
<para>
220
-
<informaltable>
221
-
<tgroup cols="2">
222
-
<thead>
223
-
<row>
224
-
<entry>&Version;</entry>
225
-
<entry>&Description;</entry>
226
-
</row>
227
-
</thead>
228
-
<tbody>
229
-
&strings.changelog.encoding;
230
-
<row>
231
-
<entry>5.4.0</entry>
232
-
<entry>
233
-
The default value for the <parameter>encoding</parameter> parameter was
234
-
changed to UTF-8.
235
-
</entry>
236
-
</row>
237
-
<row>
238
-
<entry>5.4.0</entry>
239
-
<entry>
240
-
The constants <constant>ENT_SUBSTITUTE</constant>, <constant>ENT_DISALLOWED</constant>,
241
-
<constant>ENT_HTML401</constant>, <constant>ENT_XML1</constant>,
242
-
<constant>ENT_XHTML</constant> and <constant>ENT_HTML5</constant> were added.
243
-
</entry>
244
-
</row>
245
-
<row>
246
-
<entry>5.3.0</entry>
247
-
<entry>
248
-
The constant <constant>ENT_IGNORE</constant> was added.
249
-
</entry>
250
-
</row>
251
-
<row>
252
-
<entry>5.2.3</entry>
253
-
<entry>
254
-
The <parameter>double_encode</parameter> parameter was added.
255
-
</entry>
256
-
</row>
257
-
</tbody>
258
-
</tgroup>
259
-
</informaltable>
260
-
</para>
219
+
<informaltable>
220
+
<tgroup cols="2">
221
+
<thead>
222
+
<row>
223
+
<entry>&Version;</entry>
224
+
<entry>&Description;</entry>
225
+
</row>
226
+
</thead>
227
+
<tbody>
228
+
<row>
229
+
<entry>8.1.0</entry>
230
+
<entry>
231
+
<parameter>flags</parameter> changed from <constant>ENT_COMPAT</constant> to <constant>ENT_QUOTES</constant> | <constant>ENT_SUBSTITUTE</constant> | <constant>ENT_HTML401</constant>.
232
+
</entry>
233
+
</row>
234
+
</tbody>
235
+
</tgroup>
236
+
</informaltable>
261
237
</refsect1>
262
238

263
239
<refsect1 role="examples">
...
...
@@ -346,7 +322,6 @@ echo $new; // &lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;
346
322
</refsect1>
347
323

348
324
</refentry>
349
-

350
325
<!-- Keep this comment at the end of the file
351
326
Local variables:
352
327
mode: sgml
353
328