MDL-19266 lib/html2text: fix error in preg_replace_callback on php4
This commit is contained in:
+1
-1
@@ -468,7 +468,7 @@ class html2text
|
||||
|
||||
// Run our defined search-and-replace
|
||||
$text = preg_replace($this->search, $this->replace, $text);
|
||||
$text = preg_replace_callback($this->callback_search, array('html2text', '_preg_callback'), $text);
|
||||
$text = preg_replace_callback($this->callback_search, array(&$this, '_preg_callback'), $text);
|
||||
|
||||
// Replace known html entities
|
||||
$text = utf8_encode(html_entity_decode($text));
|
||||
|
||||
@@ -21,4 +21,19 @@ instead of:
|
||||
(see http://nz.php.net/manual/en/function.html-entity-decode.php#89483)
|
||||
|
||||
|
||||
2- fixed error in preg_replace_callback on php4
|
||||
|
||||
--- a/lib/html2text.php
|
||||
+++ b/lib/html2text.php
|
||||
@@ -468,7 +468,7 @@ class html2text
|
||||
|
||||
// Run our defined search-and-replace
|
||||
$text = preg_replace($this->search, $this->replace, $text);
|
||||
- $text = preg_replace_callback($this->callback_search, array('html2text', '_preg_callback'), $text);
|
||||
+ $text = preg_replace_callback($this->callback_search, array(&$this, '_preg_callback'), $text);
|
||||
|
||||
// Replace known html entities
|
||||
$text = utf8_encode(html_entity_decode($text));
|
||||
|
||||
|
||||
-- Francois Marier <[email protected]> 2009-05-22
|
||||
|
||||
Reference in New Issue
Block a user