Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Compiler/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ public function processText($text) {
'#(: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',
'#"[\t\s]*\n+[\t\s]*([a-z-]+=")#is' => '" \1',
'#>[\040\011]+$#Ss' => '> ',
'#>[\040\011]*[\n]\s*$#Ss' => '>',
$this->stripRegEx => '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public function dataTestStrip()
'<ul><li><a href="#">BlaBla</a></li><li><a href="#">BlaBla</a></li></ul>', '', $i ++),
array("\n <textarea>\n\n some text\n\n </textarea> foo\n bar\n",
"<textarea>\n\n some text\n\n </textarea> foobar", '', $i ++),
array("<a\n href=\"{'genLink'}\"\n target=\"_blank\">link-text</a>", '<a href="genLink" target="_blank">link-text</a>', '', $i ++),
array("<span\nonclick=\"fn({'param'});\"\nclass=\"c\">text</span>", '<span onclick="fn(param);" class="c">text</span>', '', $i ++),
// variable in html tag
array("\n <b><c>c</c></b>\n", '<b><c>c</c></b>', '', $i ++),
array("\n <b> <c>c</c></b>\n", '<b> <c>c</c></b>', '', $i ++),
Expand Down