$data = $doc->saveHTML();
$newData = str_replace("<br>", "<br />\n", $data);
-$newData = str_replace("\n\n", chr(10), $newData);
+$newData = str_replace(PHP_EOL . PHP_EOL, PHP_EOL, $newData);
-$array = explode(chr(10), $newData);
+$array = explode(PHP_EOL, $newData);
array_shift($array);
array_shift($array);
unset($array[count($array) - 1]);
unset($array[count($array) - 1]);
-$newData = implode(chr(10), $array).chr(10);
+$newData = implode(PHP_EOL, $array).PHP_EOL;
// Has a template changed?
if ($data != $newData) {