Fixed HTML entities handling in task list names

This commit is contained in:
Aleksander Machniak 2012-10-29 20:41:50 +01:00
parent 04793bfaf3
commit 9d9262d71f
2 changed files with 5 additions and 2 deletions

View file

@ -76,6 +76,7 @@ class tasklist_database_driver extends tasklist_driver
while ($result && ($arr = $this->rc->db->fetch_assoc($result))) {
$arr['showalarms'] = intval($arr['showalarms']);
$arr['active'] = !in_array($arr['id'], $hidden);
$arr['name'] = html::quote($arr['name']);
$arr['editable'] = true;
$this->lists[$arr['id']] = $arr;
$list_ids[] = $this->rc->db->quote($arr['id']);

View file

@ -113,7 +113,7 @@ class tasklist_ui
$li .= html::tag('li', array('id' => 'rcmlitasklist' . $html_id, 'class' => $class),
html::tag('input', array('type' => 'checkbox', 'name' => '_list[]', 'value' => $id, 'checked' => $prop['active'])) .
html::span('handle', ' ') .
html::span('listname', Q($prop['name'])));
html::span('listname', $prop['name']));
}
$this->rc->output->set_env('tasklists', $jsenv);
@ -128,8 +128,10 @@ class tasklist_ui
*/
function tasklist_select($attrib = array())
{
$attrib['name'] = 'list';
$attrib['name'] = 'list';
$attrib['is_escaped'] = true;
$select = new html_select($attrib);
foreach ((array)$this->plugin->driver->get_lists() as $id => $prop) {
if ($prop['editable'])
$select->add($prop['name'], $id);