Skip to content

Commit

Permalink
- bugfix {strip} must remove all blanks between html tags #136
Browse files Browse the repository at this point in the history
  • Loading branch information
uwetews committed Dec 21, 2015
1 parent fd09164 commit a8f8efd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- bugfix a filepath starting with '/' or '\' on windows should normalize to the root dir
of current working drive https://github.com/smarty-php/smarty/issues/134
- optimization of filepath normalization
- bugfix {strip} must remove all blanks between html tags https://github.com/smarty-php/smarty/issues/136

===== 3.1.29 ===== (21.12.2015)
21.12.2015
Expand Down
2 changes: 1 addition & 1 deletion libs/Smarty.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
const SMARTY_VERSION = '3.1.30-dev/2';
const SMARTY_VERSION = '3.1.30-dev/3';

/**
* define variable scopes
Expand Down
2 changes: 1 addition & 1 deletion libs/sysplugins/smarty_internal_templatecompilerbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ public function processText($text)

$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',
'#(:SMARTY@!@|>)\s+(?=@!@SMARTY:|<)#s' => '\1\2',
// remove spaces between attributes (but not in attribute values!)
'#(([a-z0-9]\s*=\s*("[^"]*?")|(\'[^\']*?\'))|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \5',
'#^\s+<#Ss' => '<',
Expand Down

0 comments on commit a8f8efd

Please sign in to comment.