alecpl
2011-04-20 164b45964edc699db9e049dddd91e9de07635fcd
program/lib/washtml.php
@@ -75,6 +75,7 @@
 * - changed $ignore_elements behaviour
 * - added RFC2397 support
 * - base URL support
 * - invalid HTML comments removal before parsing
 */
class washtml
@@ -271,6 +272,10 @@
    else
      $this->config['base_url'] = '';
    // Remove invalid HTML comments (#1487759)
    // Don't remove valid conditional comments
    $html = preg_replace('/<!--[^->[]*>/', '', $html);
    @$node->loadHTML($html);
    return $this->dumpHtml($node);
  }