found little problem with plugin:
it generates another <head> and <meta charset> tags. I see that without charset it behaves badly, but there is no way of removing ? <head> can be removed easily, (added tags in your replace where html and body were replaced)
EDIT:
so I've modified plugin this way and it looks like it's OK and UTF-8 is preserved too (would be glad that somebody tests it too, Slovak UTF-8 characters work)
it generates another <head> and <meta charset> tags. I see that without charset it behaves badly, but there is no way of removing ? <head> can be removed easily, (added tags in your replace where html and body were replaced)
EDIT:
so I've modified plugin this way and it looks like it's OK and UTF-8 is preserved too (would be glad that somebody tests it too, Slovak UTF-8 characters work)
Code:
#76 return substr($contents,68);
Code:
#224 $html_fragment = preg_replace('/^<!DOCTYPE.+?>/', '', str_replace( array('<html>', '</html>', '<body>', '</body>', '<head>', '</head>'), array('', '', '', '', '', ''), $dom_document->saveHTML()));