diff --git a/cake/console/libs/console_output.php b/cake/console/libs/console_output.php
index 9dd9cbaa6c1..0ac5cefc360 100644
--- a/cake/console/libs/console_output.php
+++ b/cake/console/libs/console_output.php
@@ -176,7 +176,7 @@ public function styleText($text) {
protected function _replaceTags($matches) {
$style = $this->styles($matches['tag']);
if (empty($style)) {
- return $matches['text'];
+ return '<' . $matches['tag'] . '>' . $matches['text'] . '' . $matches['tag'] . '>';
}
$styleInfo = array();
diff --git a/cake/tests/cases/console/libs/console_output.test.php b/cake/tests/cases/console/libs/console_output.test.php
index a0192e7b465..c67ded9e89c 100644
--- a/cake/tests/cases/console/libs/console_output.test.php
+++ b/cake/tests/cases/console/libs/console_output.test.php
@@ -171,7 +171,7 @@ function testFormattingCustom() {
*/
function testFormattingMissingStyleName() {
$this->output->expects($this->once())->method('_write')
- ->with("Error: Something bad");
+ ->with("Error: Something bad");
$this->output->write('Error: Something bad', false);
}