Added stripTags (default: false) to allow stripping out HTML tags
[core.git] / inc / classes / main / debug / class_DebugConsoleOutput.php
index 2c06c1f7ecc81f1733d6ee4e55865c28100b204e..16e8dfa80435ad8ec351be442f000f655b5d5706 100644 (file)
@@ -49,16 +49,23 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, Output
         * Outputs the given data without HTML tags
         *
         * @param       $output         The HTML'ed output
+        * @param       $stripTags      Whether HTML tags shall be stripped out
         * @return      void
         */
-       public final function outputStream ($output) {
-               // Prepare the output
-               $output = trim(html_entity_decode(strip_tags(stripslashes($output))));
+       public final function outputStream ($output, $stripTags = false) {
+               // Strip HTML tags out?
+               if ($stripTags === true) {
+                       // Prepare the output without HTML tags
+                       $output = trim(html_entity_decode(strip_tags(stripslashes($output))));
+               } else {
+                       // Prepare the output with HTML tags
+                       $output = trim(stripslashes($output));
+               }
 
                // Are debug times enabled?
                if ($this->getConfigInstance()->getConfigEntry('debug_output_timings') == 'Y') {
                        // Output it first
-                       print($this->getPrintableExecutionTime());
+                       $output = $this->getPrintableExecutionTime() . $output;
                } // END - if
 
                // And print it out...
@@ -68,12 +75,14 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, Output
        /**
         * Output the code
         *
+        * @param       $outStream      Stream to output
+        * @param       $stripTags      Whether HTML tags shall be stripped out
         * @return      void
         */
-       public final function output ($outStream = false) {
+       public final function output ($outStream = false, $stripTags = false) {
                // Empty output will be silently ignored
                if ($outStream !== false) {
-                       $this->outputStream($outStream);
+                       $this->outputStream($outStream, $stripTags);
                } // END - if
        }