Skip to content

Commit

Permalink
Fix handling of &, <, > characters in scripts/filter names (#1489208)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jun 26, 2013
1 parent 1b52cfc commit d6b5929
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions plugins/managesieve/Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Support string list arguments in filter form (#1489018)
- Support date, currendate and index tests - RFC5260 (#1488120)
- Split plugin file into two files
- Fix handling of &, <, > characters in scripts/filter names (#1489208)

* version 6.2 [2013-02-17]
-----------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ function filtersets_list($attrib, $no_env = false)
foreach ($list as $idx => $set) {
$scripts['S'.$idx] = $set;
$result[] = array(
'name' => rcube::Q($set),
'name' => $set,
'id' => 'S'.$idx,
'class' => !in_array($set, $this->active) ? 'disabled' : '',
);
Expand Down Expand Up @@ -2111,7 +2111,7 @@ public function list_rules()
$fname = $filter['name'] ? $filter['name'] : "#$i";
$result[] = array(
'id' => $idx,
'name' => rcube::Q($fname),
'name' => $fname,
'class' => $filter['disabled'] ? 'disabled' : '',
);
$i++;
Expand Down
8 changes: 4 additions & 4 deletions plugins/managesieve/managesieve.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
var i, row = $('#rcmrow'+this.managesieve_rowid(o.id));

if (o.name)
$('td', row).html(o.name);
$('td', row).text(o.name);
if (o.disabled)
row.addClass('disabled');
else
Expand All @@ -278,7 +278,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
var list = this.filters_list,
row = $('<tr><td class="name"></td></tr>');

$('td', row).html(o.name);
$('td', row).text(o.name);
row.attr('id', 'rcmrow'+o.id);
if (o.disabled)
row.addClass('disabled');
Expand All @@ -302,7 +302,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
tr = document.createElement('TR');
td = document.createElement('TD');

td.innerHTML = el.name;
$(td).text(el.name);
td.className = 'name';
tr.id = 'rcmrow' + el.id;
if (el['class'])
Expand Down Expand Up @@ -351,7 +351,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o)
list = this.filtersets_list,
row = $('<tr class="disabled"><td class="name"></td></tr>');

$('td', row).html(o.name);
$('td', row).text(o.name);
row.attr('id', 'rcmrow'+id);

this.env.filtersets[id] = o.name;
Expand Down

0 comments on commit d6b5929

Please sign in to comment.