Bug Tracker

Ticket #2018: jquery.autocomplete.js.diff

File jquery.autocomplete.js.diff, 648 bytes (added by ash, 7 years ago)

Trivial patch

  • jquery.autocomplete.js

     
    507507        multiple: false, 
    508508        multipleSeparator: ", ", 
    509509        highlight: function(value, term) { 
    510                 return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"); 
     510                return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(new RegExp("([()[\\]\\\\{}?.+*|^$])","gi"),"\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"); 
    511511        }, 
    512512    scroll: true, 
    513513    scrollHeight: 180,