Anonymous - 2007-02-13

Logged In: YES
user_id=1148016
Originator: NO

Open html2text.inc and find the line that says "function htmlDecode ($text) {", this is an incomplete function that is meant to decode the HTML entities. For a very strange reason he omitted this and put in a comment saying "// TBD" ("to be done"). The only explanation I can think of is that he wanted to write his own HTML-entity-to-ascii converter. Whatever his reasons may be, PHP has its own function for that so just add a line BEFORE "return $text" saying "$text = html_entity_decode($text);".

The result looks like this:

function htmlDecode ($text) {
$text = html_entity_decode($text);
return $text;
}

And his old, empty function looked like this:

function htmlDecode ($text) {
// TBD
return $text;
}

Best Regards