Fixes for html_ent branch in ROundcube core: Proper HTML entities handling
This commit is contained in:
parent
7651e5de39
commit
f693e2d183
4 changed files with 10 additions and 9 deletions
|
@ -404,7 +404,7 @@ class calendar extends rcube_plugin
|
|||
$select_cal = new html_select(array('name' => '_default_calendar', 'id' => $field_id));
|
||||
foreach ((array)$this->driver->list_calendars() as $id => $prop) {
|
||||
if (!$prop['readonly'])
|
||||
$select_cal->add($prop['name'], strval($id));
|
||||
$select_cal->add(html_entity_decode($prop['name'], ENT_COMPAT, 'UTF-8'), strval($id));
|
||||
if ($prop['default'])
|
||||
$default_calendar = $id;
|
||||
}
|
||||
|
@ -712,7 +712,7 @@ class calendar extends rcube_plugin
|
|||
$numcals = 0;
|
||||
foreach ($calendars as $calendar) {
|
||||
if (!$calendar['readonly']) {
|
||||
$calendar_select->add($calendar['name'], $calendar['id']);
|
||||
$calendar_select->add(html_entity_decode($calendar['name'], ENT_COMPAT, 'UTF-8'), $calendar['id']);
|
||||
$numcals++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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($prop['name'])));
|
||||
html::span('calname', Q(html_entity_decode($prop['name'], ENT_COMPAT, 'UTF-8'))));
|
||||
}
|
||||
|
||||
$this->rc->output->set_env('calendars', $jsenv);
|
||||
|
@ -252,7 +252,7 @@ class calendar_ui
|
|||
$select = new html_select($attrib);
|
||||
foreach ((array)$this->cal->driver->list_calendars() as $id => $prop) {
|
||||
if (!$prop['readonly'])
|
||||
$select->add($prop['name'], $id);
|
||||
$select->add(html_entity_decode($prop['name'], ENT_COMPAT, 'UTF-8'), $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) . '» ' . substr($foldername, $length);
|
||||
$foldername = str_repeat(' ', $count-1) . '» ' . html::quote(substr($foldername, $length));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -171,14 +171,14 @@ class kolab_activesync_ui
|
|||
$classes = array('mailbox');
|
||||
|
||||
if ($folder_class = rcmail_folder_classname($folder)) {
|
||||
$foldername = rcube_label($folder_class);
|
||||
$foldername = html::quote(rcube_label($folder_class));
|
||||
$classes[] = $folder_class;
|
||||
}
|
||||
|
||||
$folder_id = 'rcmf' . html_identifier($folder);
|
||||
$padding = str_repeat(' ', $level);
|
||||
|
||||
$table->add_row(array('class' => (($level+1) * $idx++) % 2 == 0 ? 'even' : 'odd'));
|
||||
$table->add_row();
|
||||
$table->add('subscription', $checkbox_sync->show(
|
||||
!empty($subscribed[$folder]) ? $folder : null,
|
||||
array('value' => $folder, 'id' => $folder_id)));
|
||||
|
@ -189,7 +189,7 @@ class kolab_activesync_ui
|
|||
array('value' => $folder, 'id' => $folder_id.'_alarm')));
|
||||
}
|
||||
|
||||
$table->add(join(' ', $classes), html::label($folder_id, $padding . Q($foldername)));
|
||||
$table->add(join(' ', $classes), html::label($folder_id, $padding . $foldername));
|
||||
}
|
||||
|
||||
return $table->show();
|
||||
|
|
|
@ -481,6 +481,7 @@ class kolab_storage
|
|||
$names = array();
|
||||
|
||||
// Build SELECT field of parent folder
|
||||
$attrs['is_escaped'] = true;
|
||||
$select = new html_select($attrs);
|
||||
$select->add('---', '');
|
||||
|
||||
|
@ -494,7 +495,7 @@ class kolab_storage
|
|||
$length = strlen($names[$i].' » ');
|
||||
$prefix = substr($name, 0, $length);
|
||||
$count = count(explode(' » ', $prefix));
|
||||
$name = str_repeat(' ', $count-1) . '» ' . substr($name, $length);
|
||||
$name = str_repeat(' ', $count-1) . '» ' . html::quote(substr($name, $length));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue