Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change callback to instance rather than classname. #6

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions program/lib/html2text.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class html2text
'-',
'*',
'£',
'EUR', // Euro sign. � ?
'EUR', // Euro sign. � ?
'|+|amp|+|', // Ampersand: see _converter()
' ', // Runs of spaces, post-handling
);
Expand Down Expand Up @@ -507,7 +507,7 @@ function _converter(&$text)
$text = preg_replace($this->search, $this->replace, $text);

// Run our defined tags search-and-replace with callback
$text = preg_replace_callback($this->callback_search, array('html2text', '_preg_callback'), $text);
$text = preg_replace_callback($this->callback_search, array($this, '_preg_callback'), $text);

// Strip any other HTML tags
$text = strip_tags($text, $this->allowed_tags);
Expand Down