From c238053e99e1af6e8a3dc8d804b6381838285a8d Mon Sep 17 00:00:00 2001 From: bzick Date: Thu, 30 Oct 2014 23:56:16 +0300 Subject: [PATCH] Fix #120, #104, #119 --- src/Fenom/Template.php | 5 +++-- tests/cases/FenomTest.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Fenom/Template.php b/src/Fenom/Template.php index 536ccd5..05ce2b2 100644 --- a/src/Fenom/Template.php +++ b/src/Fenom/Template.php @@ -343,8 +343,9 @@ class Template extends Render $text = str_replace("' . PHP_EOL, $text); } if($this->_options & Fenom::AUTO_STRIP) { - $text = preg_replace('/\s+/uS', ' ', $text); - $text = preg_replace('/\s*([\pP\pS]+)\s*/uS', '$1', $text); + + $text = preg_replace('/\s+/uS', ' ', str_replace(array("\r", "\n"), " ", $text)); +// $text = preg_replace('/\s*([\pP\pS]+)\s*/uS', '$1', $text); } $this->_body .= $text; } diff --git a/tests/cases/FenomTest.php b/tests/cases/FenomTest.php index dc125b6..e49b66f 100644 --- a/tests/cases/FenomTest.php +++ b/tests/cases/FenomTest.php @@ -324,7 +324,7 @@ class FenomTest extends \Fenom\TestCase number {\$num.1} TPL; - $this->assertRender($tpl, '
number one
'); + $this->assertRender($tpl, '
number one
'); } }