From 275e08bee1282f8cf8079065f6f4460552cd8934 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 6 Apr 2008 04:03:15 +0000 Subject: [PATCH] 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 --- forms/FormField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/FormField.php b/forms/FormField.php index fe116967e..9bfdd6ec3 100644 --- a/forms/FormField.php +++ b/forms/FormField.php @@ -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";