Merged revisions 47608 via svnmerge from

svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r47608 | ischommer | 2008-01-04 19:09:50 +1300 (Fri, 04 Jan 2008) | 1 line
  
  additional value-checking in createTag()
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52192 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-04-06 04:03:15 +00:00
parent 4a7a4dde9e
commit 275e08bee1

View File

@ -402,7 +402,7 @@ HTML;
function createTag($tag, $attributes, $content = null) {
$preparedAttributes = '';
foreach($attributes as $k => $v) {
$preparedAttributes .= " $k=\"" . Convert::raw2att($v) . "\"";
if(!empty($v)) $preparedAttributes .= " $k=\"" . Convert::raw2att($v) . "\"";
}
if($content) return "<$tag$preparedAttributes>$content</$tag>";