diff options
-rw-r--r-- | it_html.class | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/it_html.class b/it_html.class index ba80752..9203c98 100644 --- a/it_html.class +++ b/it_html.class @@ -388,20 +388,20 @@ function select($tags, $options, $selected = null) { $grouphtml = ""; foreach($option as $optval => $opt) - $grouphtml .= $this->_tag("option", array(array('value' => $optval, 'selected' => in_array((string)$optval, $selected)), self::_strip_span(Q(self::_strip_span($opt))))); + $grouphtml .= $this->_tag("option", array(array('value' => $optval, 'selected' => in_array((string)$optval, $selected)), self::_strip_tags(Q(self::_strip_tags($opt))))); $html .= $this->_tag("optgroup", array(array('label' => $value, $grouphtml))); } else - $html .= $this->_tag("option", array(array('value' => $value, 'selected' => in_array((string)$value, $selected), 'disabled' => $option === ""), (trim($option) === "") ? " " : self::_strip_span(Q(self::_strip_span($option))))); # self::_strip_span removes .q debug param coloring + $html .= $this->_tag("option", array(array('value' => $value, 'selected' => in_array((string)$value, $selected), 'disabled' => $option === ""), (trim($option) === "") ? " " : self::_strip_tags(Q(self::_strip_tags($option))))); # self::_strip_tags removes .q debug param coloring } return $this->_tag("select", array($tags, $html)); } # internal: strip spans added by debug params -function _strip_span($html) +function _strip_tags($html) { - return preg_replace('!</?span[^>]*>!', '', $html); + return preg_replace('!</?(span|a)\b[^>]*>!', '', $html); } /** |