View.php
authorAlan Knowles <alan@roojs.com>
Thu, 8 Nov 2012 06:29:26 +0000 (14:29 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 8 Nov 2012 06:29:26 +0000 (14:29 +0800)
View.php

index 857a320..7771978 100644 (file)
--- a/View.php
+++ b/View.php
@@ -35,6 +35,11 @@ class Pman_Ftp_View extends Pman_Ftp_List
                 $matches = array();
                 if (preg_match('#^\s*<\?xml.*encoding="([^"]+)"#mi', $fc, $matches)) {
                     $fc = iconv($matches[1], "UTF8//IGNORE", $fc);
+                    if (class_exists('Tidy')) {
+                        $tidy = new Tidy();
+                        $tidy->parseString($fc);
+                       $tidy->cleanRepair();
+                       $fc= $tidy->toString();
                 }