summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/htmlentities17.phpt
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2010-10-10 19:04:59 +0000
committerGustavo André dos Santos Lopes <cataphract@php.net>2010-10-10 19:04:59 +0000
commit7aa43a8d834e386a1b38490644983c0c3587dcd5 (patch)
tree7c6ec23ac08818bd24463bf3dae8bbb873904d60 /ext/standard/tests/strings/htmlentities17.phpt
parentb1d5cf7348105cb8205b0fe7c54494b1fefd80cf (diff)
downloadphp-git-7aa43a8d834e386a1b38490644983c0c3587dcd5.tar.gz
- Revamp of the decoding portion of html.c.
- Dramatic improvements on the performance of html_entity_decode and htmlspecialchars_decode, as the string is now traversed only once. Speedups of 20 to 25 times with Windows release builds and a ~250 characters string (for 2nd and subsequent calls). - Consistent behavior on html_entity_decode. For instance, the entity in "&&lt;" would be decoded, but not "&&#233;". Not anymore. The code path for "basic" and non-basic entities is now mostly shared. - Code of html_entity_decode and htmlspecialchars_decode is now shared. - [DOC] More consistent behavior of htmlspecialchars_decode. Instead of translating only &lt;, &gt;, &amp;, &quot;, &#039; and &#39;, now e.g. &#34;, &apos;, &#0039;, &#x27;, etc. are also decoded. - [DOC] Previous translation of unicode code points in numerical entities was seriously broken. When the code points for some character were not the same in unicode and the target encoding, the behavior could be an erroneous translation (e.g. 0x80-0xA0 in win-1252) or no translation at all. Added unicode translation tables for all single-byte encodings. Entities are not translated for multi-byte entities, except for ASCII characters whose code points are shared. We could add the huge translation tables (several thousand elements) for those encodings in the future. - Fixed numerical entities that after # had text accepted by strcol being accepted. - Much more commented and well-structured code... - Tests for get_html_translation_table()) are broken. I stared fixing the tests, but then I realized it was completely helpless because get_html_translation_table() is broken by not handling multi-byte characters correctly.
Diffstat (limited to 'ext/standard/tests/strings/htmlentities17.phpt')
-rw-r--r--ext/standard/tests/strings/htmlentities17.phpt3
1 files changed, 0 insertions, 3 deletions
diff --git a/ext/standard/tests/strings/htmlentities17.phpt b/ext/standard/tests/strings/htmlentities17.phpt
index b203e7c3e0..d9e67a9b87 100644
--- a/ext/standard/tests/strings/htmlentities17.phpt
+++ b/ext/standard/tests/strings/htmlentities17.phpt
@@ -3,7 +3,6 @@ htmlentities() / html_entity_decode() #8592 - #9002 table test
--FILE--
<?php
$tests = array(
- array(8768, '&wreath;', "e28980"),
array(8853, '&oplus;', "e28a95"),
array(8855, '&otimes;', "e28a97"),
array(8869, '&perp;', "e28aa5"),
@@ -26,7 +25,6 @@ foreach ($tests as $test) {
}
?>
--EXPECT--
-string(8) "&wreath;"
string(7) "&oplus;"
string(8) "&otimes;"
string(6) "&perp;"
@@ -37,7 +35,6 @@ string(8) "&lfloor;"
string(8) "&rfloor;"
string(6) "&lang;"
string(6) "&rang;"
-string(6) "e28980"
string(6) "e28a95"
string(6) "e28a97"
string(6) "e28aa5"