Changeset 31064


Ignore:
Timestamp:
2016-11-06T19:06:32+13:00 (6 years ago)
Author:
Georgiy Litvinov
Message:

Optimized regular expression in hierarchy menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/hierarchy.js

    r31063 r31064  
    238238        }
    239239    } else {
     240        var escapedInput = input.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
    240241        //RegExp to get SuggestionsMenu
    241         var SuggestionsMenuExp = new RegExp(".*" + input + ".*","i")
     242        var SuggestionsMenuExp = new RegExp( escapedInput,"i");
    242243       
    243244            for(var key in hierarchyData)
Note: See TracChangeset for help on using the changeset viewer.