diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index a7fe76e203..1b8b21a1c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -42,7 +42,9 @@ $(document).ready(function() { $(current_column).find("input[type='text']").val(itm); // select the corresponding option $(current_column).find("select option").each(function(){ - if ( $(this).text().toLowerCase() == itm.toLowerCase() ) { + opt = $(this).text().toLowerCase(); + opt = opt.replace(/^\s*|\s*$/g,''); + if ( opt == itm.toLowerCase() ) { $(this).attr('selected', 'selected'); } });