X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=DOCS%2Ftpl-validator.php;h=6fb9e3c21d226227e8fa82d031c31ab4bc631822;hp=c0a8dc3e4085939c01ad7378acce56bb3f8e0834;hb=def1c791b52a6b8b5891539387525c3736f3c24c;hpb=c8d76610eb94093d4eed4fcd8a6cb72e74c8f6d8
diff --git a/DOCS/tpl-validator.php b/DOCS/tpl-validator.php
index c0a8dc3e40..6fb9e3c21d 100644
--- a/DOCS/tpl-validator.php
+++ b/DOCS/tpl-validator.php
@@ -16,8 +16,8 @@
* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -48,23 +48,23 @@ if ($_SERVER['argc'] < 2) {
print "Validating template ".$_SERVER['argv'][1]."...\n";
$doc = new DOMDocument();
-$doc->formatOutput = true;
-$doc->preserveWhiteSpace = false;
-$doc->encoding = 'utf-8';
+$doc->formatOutput = TRUE;
+$doc->preserveWhiteSpace = FALSE;
+$doc->encoding = 'UTF-8';
$doc->xmlVersion = '1.1';
$doc->loadHTMLFile($_SERVER['argv'][1]);
$data = $doc->saveHTML();
$newData = str_replace("
", "
\n", $data);
-$newData = str_replace("\n\n", "\n", $newData);
+$newData = str_replace("\n\n", chr(10), $newData);
-$array = explode("\n", $newData);
+$array = explode(chr(10), $newData);
array_shift($array);
array_shift($array);
unset($array[count($array) - 1]);
unset($array[count($array) - 1]);
-$newData = implode("\n", $array)."\n";
+$newData = implode(chr(10), $array).chr(10);
// Has a template changed?
if ($data != $newData) {