reference/strings/functions/get-html-translation-table.xml
eabde0419cf90f596f60db00e31fcb6ebe41ac55
...
...
@@ -1,6 +1,6 @@
1
-
<?xml version="1.0" encoding="UTF-8"?>
1
+
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.get-html-translation-table">
3
+
<refentry xml:id="function.get-html-translation-table" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>get_html_translation_table</refname>
6
6
<refpurpose>Returns the translation table used by <function>htmlspecialchars</function> and <function>htmlentities</function></refpurpose>
...
...
@@ -10,9 +10,9 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>array</type><methodname>get_html_translation_table</methodname>
13
-
<methodparam choice="opt"><type>int</type><parameter>table</parameter><initializer>HTML_SPECIALCHARS</initializer></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>'UTF-8'</initializer></methodparam>
13
+
<methodparam choice="opt"><type>int</type><parameter>table</parameter><initializer><constant>HTML_SPECIALCHARS</constant></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>string</type><parameter>encoding</parameter><initializer>"UTF-8"</initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
18
<function>get_html_translation_table</function> will return the
...
...
@@ -51,7 +51,7 @@
51
51
<para>
52
52
A bitmask of one or more of the following flags, which specify which quotes the
53
53
table will contain as well as which document type the table is for. The default is
54
-
<literal>ENT_COMPAT | ENT_HTML401</literal>.
54
+
<literal>ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401</literal>.
55
55
<table>
56
56
<title>Available <parameter>flags</parameter> constants</title>
57
57
<tgroup cols="2">
...
...
@@ -75,6 +75,13 @@
75
75
<entry>Table will neither contain entities for single quotes nor for double quotes.</entry>
76
76
</row>
77
77
<row>
78
+
<entry><constant>ENT_SUBSTITUTE</constant></entry>
79
+
<entry>
80
+
Replace invalid code unit sequences with a Unicode Replacement Character
81
+
U+FFFD (UTF-8) or &amp;#xFFFD; (otherwise) instead of returning an empty string.
82
+
</entry>
83
+
</row>
84
+
<row>
78
85
<entry><constant>ENT_HTML401</constant></entry>
79
86
<entry>Table for HTML 4.01.</entry>
80
87
</row>
...
...
@@ -101,8 +108,7 @@
101
108
<listitem>
102
109
<para>
103
110
Encoding to use.
104
-
If omitted, the default value for this argument is ISO-8859-1 in
105
-
versions of PHP prior to 5.4.0, and UTF-8 from PHP 5.4.0 onwards.
111
+
If omitted, the default value for this argument is UTF-8.
106
112
</para>
107
113
&reference.strings.charsets;
108
114
</listitem>
...
...
@@ -121,40 +127,24 @@
121
127

122
128
<refsect1 role="changelog">
123
129
&reftitle.changelog;
124
-
<para>
125
-
<informaltable>
126
-
<tgroup cols="2">
127
-
<thead>
128
-
<row>
129
-
<entry>&Version;</entry>
130
-
<entry>&Description;</entry>
131
-
</row>
132
-
</thead>
133
-
<tbody>
134
-
<row>
135
-
<entry>5.4.0</entry>
136
-
<entry>
137
-
The default value for the <parameter>encoding</parameter> parameter was
138
-
changed to UTF-8.
139
-
</entry>
140
-
</row>
141
-
<row>
142
-
<entry>5.4.0</entry>
143
-
<entry>
144
-
The constants <constant>ENT_HTML401</constant>, <constant>ENT_XML1</constant>,
145
-
<constant>ENT_XHTML</constant> and <constant>ENT_HTML5</constant> were added.
146
-
</entry>
147
-
</row>
148
-
<row>
149
-
<entry>5.3.4</entry>
150
-
<entry>
151
-
The <parameter>encoding</parameter> parameter was added.
152
-
</entry>
153
-
</row>
154
-
</tbody>
155
-
</tgroup>
156
-
</informaltable>
157
-
</para>
130
+
<informaltable>
131
+
<tgroup cols="2">
132
+
<thead>
133
+
<row>
134
+
<entry>&Version;</entry>
135
+
<entry>&Description;</entry>
136
+
</row>
137
+
</thead>
138
+
<tbody>
139
+
<row>
140
+
<entry>8.1.0</entry>
141
+
<entry>
142
+
<parameter>flags</parameter> changed from <constant>ENT_COMPAT</constant> to <constant>ENT_QUOTES</constant> | <constant>ENT_SUBSTITUTE</constant> | <constant>ENT_HTML401</constant>.
143
+
</entry>
144
+
</row>
145
+
</tbody>
146
+
</tgroup>
147
+
</informaltable>
158
148
</refsect1>
159
149

160
150
<refsect1 role="examples">
...
...
@@ -210,7 +200,6 @@ array(1510) {
210
200
</refsect1>
211
201

212
202
</refentry>
213
-

214
203
<!-- Keep this comment at the end of the file
215
204
Local variables:
216
205
mode: sgml
217
206