Browse Source

Fix HTML entity table generation

pull/616/merge
Dmitry Panin 13 years ago
committed by Nikita Popov
parent
commit
e2fc6b52f0
  1. 4
      ext/standard/html_tables.h
  2. 1
      ext/standard/html_tables/html_table_gen.php
  3. 9
      ext/standard/tests/strings/get_html_translation_table_basic5.phpt
  4. 3
      ext/standard/tests/strings/htmlentities_html5.phpt

4
ext/standard/html_tables.h

@ -1395,8 +1395,8 @@ static const entity_multicodepoint_row multi_cp_html5_02ACC[] = {
{ {0x0FE00, "varsupsetneqq", 13} }, { {0x0FE00, "varsupsetneqq", 13} },
}; };
static const entity_multicodepoint_row multi_cp_html5_02AFD[] = { static const entity_multicodepoint_row multi_cp_html5_02AFD[] = {
{ {01, NULL , 0} },
{ {0x0FE00, "varsupsetneqq", 13} },
{ {01, "parsl", 5} },
{ {0x020E5, "nparsl", 6} },
}; };
/* End of double code point tables }}} */ /* End of double code point tables }}} */

1
ext/standard/html_tables/html_table_gen.php

@ -461,6 +461,7 @@ if (empty($multicp_rows))
ksort($multicp_rows); ksort($multicp_rows);
foreach ($multicp_rows as &$v) { ksort($v); } foreach ($multicp_rows as &$v) { ksort($v); }
unset($v);
echo echo
"/* {{{ Start of double code point tables for $name */", "\n\n"; "/* {{{ Start of double code point tables for $name */", "\n\n";

9
ext/standard/tests/strings/get_html_translation_table_basic5.phpt

@ -46,7 +46,7 @@ echo "Done\n";
--EXPECT-- --EXPECT--
*** Testing get_html_translation_table() : basic functionality/HTML 5 *** *** Testing get_html_translation_table() : basic functionality/HTML 5 ***
-- with table = HTML_ENTITIES, ENT_COMPAT -- -- with table = HTML_ENTITIES, ENT_COMPAT --
int(1509)
int(1510)
Array Array
( (
[Æ] => Æ [Æ] => Æ
@ -1108,6 +1108,7 @@ Array
[⋾] => ⋾ [⋾] => ⋾
[⋽] => ⋽ [⋽] => ⋽
[∦] => ∦ [∦] => ∦
[⫽⃥] => &nparsl
[∂̸] => &npart [∂̸] => &npart
[⨔] => ⨔ [⨔] => ⨔
[⊀] => ⊀ [⊀] => ⊀
@ -1196,6 +1197,7 @@ Array
[⌽] => ⌽ [⌽] => ⌽
[¶] => ¶ [¶] => ¶
[⫳] => ⫳ [⫳] => ⫳
[⫽] => ⫽
[∂] => ∂ [∂] => ∂
[п] => п [п] => п
[%] => % [%] => %
@ -1500,7 +1502,6 @@ Array
[⦜] => ⦜ [⦜] => ⦜
[ϰ] => ϰ [ϰ] => ϰ
[⫌︀] => &varsupsetneqq [⫌︀] => &varsupsetneqq
[⫽︀] => &varsupsetneqq
[⊲] => ⊲ [⊲] => ⊲
[в] => в [в] => в
[⊢] => ⊢ [⊢] => ⊢
@ -1561,9 +1562,9 @@ Array
[‌] => ‌ [‌] => ‌
) )
-- with table = HTML_ENTITIES, ENT_QUOTES -- -- with table = HTML_ENTITIES, ENT_QUOTES --
int(1510)
int(1511)
-- with table = HTML_ENTITIES, ENT_NOQUOTES -- -- with table = HTML_ENTITIES, ENT_NOQUOTES --
int(1508)
int(1509)
-- with table = HTML_SPECIALCHARS, ENT_COMPAT -- -- with table = HTML_SPECIALCHARS, ENT_COMPAT --
int(4) int(4)
Array Array

3
ext/standard/tests/strings/htmlentities_html5.phpt

@ -1418,6 +1418,7 @@ foreach ($mpcent as $i) {
⫱ U+02AF1 ⫱ U+02AF1
⫲ U+02AF2 ⫲ U+02AF2
⫳ U+02AF3 ⫳ U+02AF3
⫽ U+02AFD
ff U+0FB00 ff U+0FB00
fi U+0FB01 fi U+0FB01
fl U+0FB02 fl U+0FB02
@ -1620,4 +1621,4 @@ foreach ($mpcent as $i) {
⫆̸ U+02AC6 U+00338 ⫆̸ U+02AC6 U+00338
⫋︀ U+02ACB U+0FE00 ⫋︀ U+02ACB U+0FE00
⫌︀ U+02ACC U+0FE00 ⫌︀ U+02ACC U+0FE00
⫌︀ U+02AFD U+0FE00
⫽︀ U+02AFD U+0FE00
Loading…
Cancel
Save