mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
Fix missing numeric entities (shows up when DirectLexing).
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
parent
e76f4b45d0
commit
b4469f17aa
2
NEWS
2
NEWS
@ -41,6 +41,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
||||
interaction with Zend Debugger and APC. Reported by Antonio Parraga.
|
||||
- Fix URI handling when hostname is missing but scheme is present.
|
||||
Reported by Neike Taika-Tessaro.
|
||||
- Fix missing numeric entities on DirectLex; thanks Neike Taika-Tessaro
|
||||
for reporting.
|
||||
|
||||
4.2.0, released 2010-09-15
|
||||
! Added %Core.RemoveProcessingInstructions, which lets you remove
|
||||
|
File diff suppressed because one or more lines are too long
@ -36,7 +36,7 @@ function unichr($dec) {
|
||||
}
|
||||
|
||||
if ( !is_dir($entity_dir) ) exit("Fatal Error: Can't find entity directory.\n");
|
||||
if ( file_exists($output_file) ) exit("Fatal Error: entity-lookup.txt already exists.\n");
|
||||
if ( file_exists($output_file) ) exit("Fatal Error: output file already exists.\n");
|
||||
|
||||
$dh = @opendir($entity_dir);
|
||||
if ( !$dh ) exit("Fatal Error: Cannot read entity directory.\n");
|
||||
@ -52,7 +52,7 @@ closedir($dh);
|
||||
if ( !$entity_files ) exit("Fatal Error: No entity files to parse.\n");
|
||||
|
||||
$entity_table = array();
|
||||
$regexp = '/<!ENTITY\s+([A-Za-z]+)\s+"&#(?:38;#)?([0-9]+);">/';
|
||||
$regexp = '/<!ENTITY\s+([A-Za-z0-9]+)\s+"&#(?:38;#)?([0-9]+);">/';
|
||||
|
||||
foreach ( $entity_files as $file ) {
|
||||
$contents = file_get_contents($entity_dir . $file);
|
||||
|
Loading…
Reference in New Issue
Block a user