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:53:16 +00:00
parent 22f7aaf56c
commit c6d1a7e325

View File

@ -130,8 +130,8 @@ 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;
}
@ -175,7 +175,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";
@ -707,4 +707,4 @@ htmlareaConfig_'.$id.'.editorURL = '."'$this->phpgwapi_js_url/htmlarea/';";
}
return $html;
}
}
}