| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Fix HTML special characters handling in message list/header display (#1488523) |
| | | - List related text/html part as attachment in plain text mode (#1488677) |
| | | - Use IMAP BINARY (RFC3516) extension to fetch message/part bodies |
| | | - Fix folder creation under public namespace root (#1488665) |
| | |
| | | } |
| | | } |
| | | else { |
| | | $attrib_arr[] = $key . '="' . self::quote($value, true) . '"'; |
| | | $attrib_arr[] = $key . '="' . self::quote($value) . '"'; |
| | | } |
| | | } |
| | | |
| | |
| | | * Replacing specials characters in html attribute value |
| | | * |
| | | * @param string $str Input string |
| | | * @param bool $validate Enables double quotation prevention |
| | | * |
| | | * @return string The quoted string |
| | | */ |
| | | public static function quote($str, $validate = false) |
| | | public static function quote($str) |
| | | { |
| | | $str = htmlspecialchars($str, ENT_COMPAT, RCMAIL_CHARSET); |
| | | |
| | | // avoid douple quotation of & |
| | | // @TODO: get rid of it |
| | | if ($validate) { |
| | | $str = preg_replace('/&([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', $str); |
| | | } |
| | | |
| | | return $str; |
| | | return htmlspecialchars($str, ENT_COMPAT, RCMAIL_CHARSET); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if (!empty($value) && empty($this->attrib['is_escaped'])) { |
| | | $value = self::quote($value, true); |
| | | $value = self::quote($value); |
| | | } |
| | | |
| | | return self::tag($this->tagname, $this->attrib, $value, |
| | |
| | | |
| | | $option_content = $option['text']; |
| | | if (empty($this->attrib['is_escaped'])) { |
| | | $option_content = self::quote($option_content, true); |
| | | $option_content = self::quote($option_content); |
| | | } |
| | | |
| | | $this->content .= self::tag('option', $attr, $option_content); |
| | |
| | | } |
| | | $list[$id] = array( |
| | | 'id' => $id, |
| | | 'name' => $prop['name'], |
| | | 'name' => html::quote($prop['name']), |
| | | 'groups' => is_array($prop['groups']), |
| | | 'readonly' => !$prop['writable'], |
| | | 'hidden' => $prop['hidden'], |
| | |
| | | { |
| | | $GLOBALS['__version'] = html::quote(RCMAIL_VERSION); |
| | | $GLOBALS['__comm_path'] = html::quote($this->app->comm_path); |
| | | $GLOBALS['__skin_path'] = Q($this->config->get('skin_path')); |
| | | $GLOBALS['__skin_path'] = html::quote($this->config->get('skin_path')); |
| | | |
| | | return preg_replace_callback('/\$(__[a-z0-9_\-]+)/', |
| | | array($this, 'globals_callback'), $input); |
| | |
| | | |
| | | $out = strtr($str, $encode_arr); |
| | | |
| | | // avoid douple quotation of & |
| | | $out = preg_replace('/&([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', $out); |
| | | |
| | | return $newlines ? nl2br($out) : $out; |
| | | } |
| | | |
| | |
| | | if (count($sources_list) < 2) { |
| | | $source = $sources_list[$SOURCE_ID]; |
| | | $hiddenfield = new html_hiddenfield(array('name' => '_source', 'value' => $SOURCE_ID)); |
| | | return html::span($attrib, Q($source['name']) . $hiddenfield->show()); |
| | | return html::span($attrib, $source['name'] . $hiddenfield->show()); |
| | | } |
| | | |
| | | $attrib['name'] = '_source'; |
| | | $attrib['is_escaped'] = true; |
| | | $attrib['onchange'] = JS_OBJECT_NAME . ".command('save', 'reload', this.form)"; |
| | | |
| | | $select = new html_select($attrib); |
| | |
| | | if (!$name && $source == 0) { |
| | | $name = rcube_label('personaladrbook'); |
| | | } |
| | | $OUTPUT->set_env('sourcename', $name); |
| | | $OUTPUT->set_env('sourcename', html_entity_decode($name, ENT_COMPAT, 'UTF-8')); |
| | | } |
| | | } |
| | | |
| | |
| | | if ($source['class_name']) |
| | | $class_name .= ' ' . $source['class_name']; |
| | | |
| | | $name = !empty($source['name']) ? $source['name'] : $id; |
| | | $out .= sprintf($line_templ, |
| | | html_identifier($id), |
| | | $class_name, |
| | | Q(rcmail_url(null, array('_source' => $id))), |
| | | $source['id'], |
| | | $js_id, (!empty($source['name']) ? Q($source['name']) : Q($id))); |
| | | $js_id, $name); |
| | | |
| | | $groupdata = array('out' => $out, 'jsdata' => $jsdata, 'source' => $id); |
| | | if ($source['groups']) |
| | |
| | | |
| | | // addressbook selector |
| | | if (count($writable_books) > 1) { |
| | | $select = new html_select(array('name' => '_target', 'id' => 'rcmimporttarget')); |
| | | $select = new html_select(array('name' => '_target', 'id' => 'rcmimporttarget', 'is_escaped' => true)); |
| | | |
| | | foreach ($writable_books as $book) |
| | | $select->add($book['name'], $book['id']); |
| | |
| | | $select_abook = new html_select(array('name' => '_default_addressbook', 'id' => $field_id)); |
| | | |
| | | foreach ($books as $book) { |
| | | $select_abook->add($book['name'], $book['id']); |
| | | $select_abook->add(html_entity_decode($book['name'], ENT_COMPAT, 'UTF-8'), $book['id']); |
| | | } |
| | | |
| | | $blocks['main']['options']['default_addressbook'] = array( |