mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-03-23 14:27:02 +00:00
Cleanup after data validation.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
parent
c0ad68108a
commit
a44187a5c1
2
NEWS
2
NEWS
@ -24,6 +24,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
|||||||
- Fix bug where background:url() always gets lower-cased
|
- Fix bug where background:url() always gets lower-cased
|
||||||
(but not background-image:url())
|
(but not background-image:url())
|
||||||
- Fix bug with non lower-case color names in HTML
|
- Fix bug with non lower-case color names in HTML
|
||||||
|
- Fix bug where data URI validation doesn't remove temporary files.
|
||||||
|
Thanks Javier Marín Ros <javiermarinros@gmail.com> for reporting.
|
||||||
|
|
||||||
4.4.0, released 2012-01-18
|
4.4.0, released 2012-01-18
|
||||||
# Removed PEARSax3 handler.
|
# Removed PEARSax3 handler.
|
||||||
|
@ -64,10 +64,12 @@ class HTMLPurifier_URIScheme_data extends HTMLPurifier_URIScheme {
|
|||||||
file_put_contents($file, $raw_data);
|
file_put_contents($file, $raw_data);
|
||||||
if (function_exists('exif_imagetype')) {
|
if (function_exists('exif_imagetype')) {
|
||||||
$image_code = exif_imagetype($file);
|
$image_code = exif_imagetype($file);
|
||||||
|
unlink($file);
|
||||||
} elseif (function_exists('getimagesize')) {
|
} elseif (function_exists('getimagesize')) {
|
||||||
set_error_handler(array($this, 'muteErrorHandler'));
|
set_error_handler(array($this, 'muteErrorHandler'));
|
||||||
$info = getimagesize($file);
|
$info = getimagesize($file);
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
|
unlink($file);
|
||||||
if ($info == false) return false;
|
if ($info == false) return false;
|
||||||
$image_code = $info[2];
|
$image_code = $info[2];
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user