select: fixed quoting of option texts in selectbox,

htmlspecialchars: dont quote   < > as they are already entities
This commit is contained in:
Ralf Becker 2005-02-09 13:50:59 +00:00
parent fa30c02528
commit f5656e49f4

View File

@ -130,7 +130,7 @@ class html
$str = @htmlspecialchars($str,ENT_COMPAT,$this->charset);
// we need '&#' unchanged, so we translate it back
$str = str_replace('&#','&#',$str);
$str = str_replace(array('&#',' ','<','>'),array('&#',' ','<','>'),$str);
return $str;
}
@ -176,7 +176,7 @@ class html
{
$out .= ' selected="1"';
}
$out .= ">" . ($no_lang || $text == '' ? $text : lang($text)) . "</option>\n";
$out .= ">" . $this->htmlspecialchars($no_lang || $text == '' ? $text : lang($text)) . "</option>\n";
}
$out .= "</select>\n";