Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Steve Compton on Aug 12, 2009 09:07
open dhtmlx forum
Bug in filterSelf when text contains special characters

We have a combo box where some options contain * and (). When the user types one of those special characters, the RegExp loses case insensitivity.

The line of code

try{ var filter=new RegExp("^"+text,"i"); } catch (e){ var filter=new RegExp("^"+text.replace(/([\[\]\{\}\(\)\+\*\\])/g,"\\$1")); }


should be

try{ var filter=new RegExp("^"+text,"i"); } catch (e){ var filter=new RegExp("^"+text.replace(/([\[\]\{\}\(\)\+\*\\])/g,"\\$1"),"i"); }
Answer posted by Alex (support) on Aug 13, 2009 01:30

Hello, 

    thank you for the provided fix.

    We'll include it into the official version.