- return '<textarea name="'.htmlspecialchars($sName).'" '.
- 'rows="'.(int)$iRows .'" cols="'.(int)$iCols.'"'.
- $sAttribs . '>'. $label_open . htmlspecialchars($sText) . $label_close ."</textarea>\n";
+
+ // FIXME: should the template do this instead????
+ else if (!isset($aAttribs['class'])) $aAttribs['class'] = 'sqmtextarea';
+
+ global $oTemplate;
+
+//FIXME: all the values in the $aAttribs list as well as $sName and $sText used to go thru htmlspecialchars()... I would propose that most everything that is assigned to the template should go thru that *in the template class* on its way between here and the actual template file. Otherwise we have to do something like: foreach ($aAttribs as $key => $value) $aAttribs[$key] = htmlspecialchars($value); $sName = htmlspecialchars($sName); $sText = htmlspecialchars($sText);
+ $oTemplate->assign('aAttribs', $aAttribs);
+ $oTemplate->assign('name', $sName);
+ $oTemplate->assign('text', $sText);
+ $oTemplate->assign('cols', (int)$iCols);
+ $oTemplate->assign('rows', (int)$iRows);
+
+ return $oTemplate->fetch('textarea.tpl');