From 4a177858efb5c82bed8d2533df8dac9246fb62f7 Mon Sep 17 00:00:00 2001 From: teepe Date: Sun, 14 Jul 2002 15:09:22 +0000 Subject: [PATCH] * fix style closing tags ( should be etc.) * prevent ' style="Array"' from the html output git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3095 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/html.class | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/class/html.class b/class/html.class index 80ab1aa3..60c0c139 100644 --- a/class/html.class +++ b/class/html.class @@ -118,7 +118,8 @@ class html { if ($xtr_prop) { echo ' '.$prop; } - if ($style && !$usecss) { + if ($style && !$usecss && !is_array($style)) { + /* last premisse is to prevent 'style="Array"' in the output */ echo ' style="'.$style.'"'; } if ($javascript) { @@ -133,7 +134,7 @@ class html { echo $text; foreach ($style as $k => $v) { /* if value of key value = true close the tag */ if ($v) { - echo ''; + echo ''; } } } else { @@ -148,15 +149,15 @@ class html { } } echo "\n"; - $indent.=' '; + $indentmore = $indent . ' '; for($i = 0;$i<$cnt;$i++) { $el = $this->html_el[$i]; - $el->echoHtml($usecss,$indent); + $el->echoHtml($usecss,$indentmore); } if ($style && !$usecss) { foreach ($style as $k => $v) { /* if value of key value = true close the tag */ if ($v) { - echo ''; + echo ''; } } } -- 2.25.1