I know, but it wasn't enough: this is my current solution. It works but it seems crude:
Code:
var bodyTag='<style>body {font-family: Arial;}</style><body>';
<?
$content = html_entity_decode($content);
$lt = strpos($content,">")+1;
$gt = strpos($content,"<",$lt);
$slash = strpos($content,"/",$gt)-$gt-1;
while ($gt-$lt) {
if ($slash > 0) {
$content = substr_replace($content,'',$lt,$gt-$lt);
}
$lt = strpos($content,">",$lt)+1;
$gt = strpos($content,"<",$lt);
$slash = strpos($content,"/",$gt)-$gt-1;
}
$content = str_replace("\n", '', $content);
$content = str_replace("\r", '', $content);
$content = str_replace("><",">';\nbodyTag+='<",$content);
echo "bodyTag+='".$content."';\n";
?>
Bookmarks