Skip to content

Commit

Permalink
Merge pull request #86 from AndrolGenhald/master
Browse files Browse the repository at this point in the history
context_menu_command_pattern doesn't handle strange folder names
  • Loading branch information
johndoh committed May 17, 2017
2 parents 16afae7 + 4e413e4 commit e826599
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contextmenu.js
Expand Up @@ -21,7 +21,7 @@ rcube_webmail.prototype.context_menu_commands = new Array();
rcube_webmail.prototype.context_menu_popup_menus = new Array();
rcube_webmail.prototype.context_menu_popup_commands = {};

rcube_webmail.prototype.context_menu_command_pattern = /rcmail\.command\(\'([^\']+)\',\s?\'([^\']*)\'/;
rcube_webmail.prototype.context_menu_command_pattern = /rcmail\.command\(\'([^\']+)\',\s?\'((?:\\\'|[^\'])*)\'/;

function rcm_listmenu_init(row, props, events) {
if (!events)
Expand Down Expand Up @@ -122,8 +122,8 @@ function rcm_foldermenu_init(el, props, events) {
// remove focus (and keyboard nav highlighting) from A
source.blur();

if (source.attr('onclick') && source.attr('onclick').match(rcmail.context_menu_command_pattern)) {
rcm_show_menu(e, this, RegExp.$2, menu);
if (source.attr('rel') && source.attr('onclick') && source.attr('onclick').match(rcmail.context_menu_command_pattern)) {
rcm_show_menu(e, this, source.attr('rel'), menu);
}
});
}
Expand Down Expand Up @@ -1024,4 +1024,4 @@ $(document).ready(function() {
}
});
}
});
});

0 comments on commit e826599

Please sign in to comment.