diff --git a/NEWS b/NEWS index 6a7e2a33..177712fd 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier did nothing. Thanks David Rothstein for reporting. - Fix improper handling of Internet Explorer conditional comments by parser. Thanks zmonteca for reporting. +- Fix missing attributes bug when running on Mac Snow Leopard and APC. + Thanks sidepodcast for the fix. 4.1.1, released 2010-05-31 - Fix undefined index warnings in maintenance scripts. diff --git a/library/HTMLPurifier/Generator.php b/library/HTMLPurifier/Generator.php index 4a624172..f5310361 100644 --- a/library/HTMLPurifier/Generator.php +++ b/library/HTMLPurifier/Generator.php @@ -215,7 +215,10 @@ class HTMLPurifier_Generator * permissible for non-attribute output. * @return String escaped data. */ - public function escape($string, $quote = ENT_COMPAT) { + public function escape($string, $quote = null) { + // Workaround for APC bug on Mac Leopard reported by sidepodcast + // http://htmlpurifier.org/phorum/read.php?3,4823,4846 + if ($quote === null) $quote = ENT_COMPAT; return htmlspecialchars($string, $quote, 'UTF-8'); }