Processing texts with the html_entity_decode added in feature #52 corrupts the text in many cases. This is an example:
$html = '<p>Use < or > symbols</p>';
var_dump($html);
$htmlDocument = new HtmlDocument();
$htmlDom = $htmlDocument->load($html);
$html = $htmlDom->save();
var_dump($html);
$htmlDom = $htmlDocument->load($html);
$html = $htmlDom->save();
var_dump($html);
Output:
string(31) "<p>Use < or > symbols</p>"
string(25) "<p>Use < or > symbols</p>"
string(23) "<p>Use <or> symbols</p>"
In fact, if the text contains any properly encoded HTML code to display on the page, it will be replaced by the tags after saving and cannot be displayed on the page anymore. It makes the Simple HTML DOM library absolutely unsafe for use. Decoding HTML entities should be removed or at least disabled by default.