mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
4a7a4dde9e
commit
275e08bee1
@ -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>";
|
||||
|
Loading…
Reference in New Issue
Block a user