Rudimentary minifying of output.
diff --git a/system/core/Output.php b/system/core/Output.php
index 1f214a0..55a505c 100755
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -323,6 +323,15 @@
{
$output =& $this->final_output;
}
+
+ // --------------------------------------------------------------------
+
+ // Is minify requested?
+ if ($CFG->item('minify_output') === TRUE)
+ {
+ $output = $this->minify($output);
+ }
+
// --------------------------------------------------------------------
@@ -558,6 +567,33 @@
}
+
+
+ // --------------------------------------------------------------------
+ /**
+ * Reduce excessive size of HTML content.
+ *
+ * @param string
+ * @param string
+ * @return string
+ */
+ public function minify($output,$type='html')
+ {
+ switch ($type)
+ {
+ case 'html':
+
+ // Replaces multiple spaces with a single space.
+ $output = preg_replace('!\s{2,}!',' ',$output);
+
+ // ...
+ break;
+ }
+
+ return $output;
+ }
+
+
}
/* End of file Output.php */