diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index 69a1063e4d..2e93f2a09d 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -436,7 +436,7 @@ class acp_extensions redirect($this->u_action); } - $formatter = new \Composer\Console\HtmlOutputFormatter([ + $formatter = new \phpbb\composer\io\html_output_formatter([ 'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow') ]); @@ -475,7 +475,7 @@ class acp_extensions redirect($this->u_action); } - $formatter = new \Composer\Console\HtmlOutputFormatter([ + $formatter = new \phpbb\composer\io\html_output_formatter([ 'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow') ]); @@ -514,7 +514,7 @@ class acp_extensions redirect($this->u_action); } - $formatter = new \Composer\Console\HtmlOutputFormatter([ + $formatter = new \phpbb\composer\io\html_output_formatter([ 'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow') ]); @@ -553,7 +553,7 @@ class acp_extensions redirect($this->u_action); } - $formatter = new \Composer\Console\HtmlOutputFormatter([ + $formatter = new \phpbb\composer\io\html_output_formatter([ 'warning' => new \Symfony\Component\Console\Formatter\OutputFormatterStyle('black', 'yellow') ]); diff --git a/phpBB/phpbb/composer/io/html_output_formatter.php b/phpBB/phpbb/composer/io/html_output_formatter.php new file mode 100644 index 0000000000..5431d3210d --- /dev/null +++ b/phpBB/phpbb/composer/io/html_output_formatter.php @@ -0,0 +1,27 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\composer\io; + +class html_output_formatter extends \Composer\Console\HtmlOutputFormatter +{ + /** + * {@inheritdoc} + */ + public function format($message) + { + $formatted = parent::format($message); + + return preg_replace_callback("{[\033\e]\[([0-9;]+)m(.*?)[\033\e]\[[0-9;]+m}s", array($this, 'formatHtml'), $formatted); + } +}