Re-fix HTML entities handling
This commit is contained in:
parent
99a692f4bd
commit
39552da980
5 changed files with 16 additions and 12 deletions
|
@ -401,10 +401,10 @@ class calendar extends rcube_plugin
|
|||
|
||||
// default calendar selection
|
||||
$field_id = 'rcmfd_default_calendar';
|
||||
$select_cal = new html_select(array('name' => '_default_calendar', 'id' => $field_id));
|
||||
$select_cal = new html_select(array('name' => '_default_calendar', 'id' => $field_id, 'is_escaped' => true));
|
||||
foreach ((array)$this->driver->list_calendars() as $id => $prop) {
|
||||
if (!$prop['readonly'])
|
||||
$select_cal->add(html_entity_decode($prop['name'], ENT_COMPAT, 'UTF-8'), strval($id));
|
||||
$select_cal->add($prop['name'], strval($id));
|
||||
if ($prop['default'])
|
||||
$default_calendar = $id;
|
||||
}
|
||||
|
@ -708,11 +708,11 @@ class calendar extends rcube_plugin
|
|||
else {
|
||||
// get a list of writeable calendars
|
||||
$calendars = $this->driver->list_calendars();
|
||||
$calendar_select = new html_select(array('name' => 'calendar', 'id' => 'calendar-saveto'));
|
||||
$calendar_select = new html_select(array('name' => 'calendar', 'id' => 'calendar-saveto', 'is_escaped' => true));
|
||||
$numcals = 0;
|
||||
foreach ($calendars as $calendar) {
|
||||
if (!$calendar['readonly']) {
|
||||
$calendar_select->add(html_entity_decode($calendar['name'], ENT_COMPAT, 'UTF-8'), $calendar['id']);
|
||||
$calendar_select->add($calendar['name'], $calendar['id']);
|
||||
$numcals++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,8 @@ class database_driver extends calendar_driver
|
|||
);
|
||||
while ($result && ($arr = $this->rc->db->fetch_assoc($result))) {
|
||||
$arr['showalarms'] = intval($arr['showalarms']);
|
||||
$arr['active'] = !in_array($arr['id'], $hidden);
|
||||
$arr['active'] = !in_array($arr['id'], $hidden);
|
||||
$arr['name'] = html::quote($arr['name']);
|
||||
$this->calendars[$arr['calendar_id']] = $arr;
|
||||
$calendar_ids[] = $this->rc->db->quote($arr['calendar_id']);
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ class calendar_ui
|
|||
$li .= html::tag('li', array('id' => 'rcmlical' . $html_id, 'class' => $class),
|
||||
html::tag('input', array('type' => 'checkbox', 'name' => '_cal[]', 'value' => $id, 'checked' => $prop['active']), '') .
|
||||
html::span('handle', ' ') .
|
||||
html::span('calname', Q(html_entity_decode($prop['name'], ENT_COMPAT, 'UTF-8'))));
|
||||
html::span('calname', $prop['name']));
|
||||
}
|
||||
|
||||
$this->rc->output->set_env('calendars', $jsenv);
|
||||
|
@ -248,11 +248,13 @@ class calendar_ui
|
|||
*/
|
||||
function calendar_select($attrib = array())
|
||||
{
|
||||
$attrib['name'] = 'calendar';
|
||||
$attrib['name'] = 'calendar';
|
||||
$attrib['is_escaped'] = true;
|
||||
$select = new html_select($attrib);
|
||||
|
||||
foreach ((array)$this->cal->driver->list_calendars() as $id => $prop) {
|
||||
if (!$prop['readonly'])
|
||||
$select->add(html_entity_decode($prop['name'], ENT_COMPAT, 'UTF-8'), $id);
|
||||
$select->add($prop['name'], $id);
|
||||
}
|
||||
|
||||
return $select->show(null);
|
||||
|
|
|
@ -162,7 +162,7 @@ class kolab_activesync_ui
|
|||
$length = strlen($names[$i].' » ');
|
||||
$prefix = substr($foldername, 0, $length);
|
||||
$count = count(explode(' » ', $prefix));
|
||||
$foldername = str_repeat(' ', $count-1) . '» ' . html::quote(substr($foldername, $length));
|
||||
$foldername = str_repeat(' ', $count-1) . '» ' . substr($foldername, $length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -390,10 +390,11 @@ class kolab_storage
|
|||
$delim = self::$imap->get_hierarchy_delimiter();
|
||||
|
||||
$folder = rcube_charset::convert($folder, 'UTF7-IMAP');
|
||||
$folder = str_replace($delim, ' » ', $folder);
|
||||
$folder = html::quote($folder);
|
||||
$folder = str_replace(html::quote($delim), ' » ', $folder);
|
||||
|
||||
if ($prefix)
|
||||
$folder = $prefix . ' ' . $folder;
|
||||
$folder = html::quote($prefix) . ' ' . $folder;
|
||||
|
||||
if (!$folder_ns)
|
||||
$folder_ns = 'personal';
|
||||
|
@ -495,7 +496,7 @@ class kolab_storage
|
|||
$length = strlen($names[$i].' » ');
|
||||
$prefix = substr($name, 0, $length);
|
||||
$count = count(explode(' » ', $prefix));
|
||||
$name = str_repeat(' ', $count-1) . '» ' . html::quote(substr($name, $length));
|
||||
$name = str_repeat(' ', $count-1) . '» ' . substr($name, $length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue