From: julmis Date: Mon, 31 Jan 2005 20:09:17 +0000 (+0000) Subject: Remove last space from attribute list in cleanAttributes2 function. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=713126cd4398b6da34953d84150b7db245458852;p=moodle.git Remove last space from attribute list in cleanAttributes2 function. --- diff --git a/lib/weblib.php b/lib/weblib.php index 7f9578ff6b..f3123fe98a 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1189,6 +1189,10 @@ function cleanAttributes2($htmlTag){ foreach ($attrArray as $arreach) { $attStr .= ' '.strtolower($arreach['name']).'="'.$arreach['value'].'" '; } + + // Remove last space from attribute list + $attStr = rtrim($attStr); + $xhtml_slash = ''; if (preg_match('%/\s*$%', $attrlist)) { $xhtml_slash = ' /';