diff --git a/change_log.txt b/change_log.txt index d74c5f28..59a96b82 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@  ===== 3.1.30-dev ===== (xx.xx.xx) + 29.04.2016 + - bugfix {strip} remove space on linebreak between html tags https://github.com/smarty-php/smarty/issues/213 + 24.04.2016 - bugfix nested {include} with relative file path could fail when called in {block} ... {/block} https://github.com/smarty-php/smarty/issues/218 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 9fe5670d..6e274fc5 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.30-dev/63'; + const SMARTY_VERSION = '3.1.30-dev/64'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 2d8cb299..04ad5d6e 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -818,9 +818,10 @@ abstract class Smarty_Internal_TemplateCompilerBase } } $expressions = array(// replace multiple spaces between tags by a single space - // can't remove them entirely, becaue that might break poorly implemented CSS display:inline-block elements - '#(:SMARTY@!@|>)\s+(?=@!@SMARTY:|<)#s' => '\1 \2', - // remove spaces between attributes (but not in attribute values!) + '#(:SMARTY@!@|>)[\040\011]+(?=@!@SMARTY:|<)#s' => '\1 \2', + // remove newline between tags + '#(:SMARTY@!@|>)[\040\011]*[\n]\s*(?=@!@SMARTY:|<)#s' => '\1\2', + // remove multiple spaces between attributes (but not in attribute values!) '#(([a-z0-9]\s*=\s*("[^"]*?")|(\'[^\']*?\'))|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \5', '#>[\040\011]+$#Ss' => '> ', '#>[\040\011]*[\n]\s*$#Ss' => '>', $this->stripRegEx => '',);