Skip to content

Search filter bar throws error when searching for '*' #2416

Closed
ntankovic opened this Issue Sep 9, 2011 · 2 comments

3 participants

@ntankovic

Searching for character '*' results in Javascript exception:

Uncaught SyntaxError: Invalid regular expression: /^*/: Nothing to repeat

@gseguin
jQuery Foundation member
gseguin commented Sep 19, 2011

We should escape the regexp special chars: .$?*|{}()[]\/+^

@hpbuniat hpbuniat added a commit to hpbuniat/jquery-mobile that referenced this issue Sep 19, 2011
@hpbuniat hpbuniat second attempt to fix #2416 df68b01
@hpbuniat

As the regex is only needed to ensure replacing from the beginning, substr & replace should be sufficient.

@hpbuniat hpbuniat added a commit to hpbuniat/jquery-mobile that referenced this issue Sep 20, 2011
@hpbuniat hpbuniat fixed typo (+ -> -) to fix #2416 2051c49
@hpbuniat hpbuniat added a commit to hpbuniat/jquery-mobile that referenced this issue Sep 23, 2011
@hpbuniat hpbuniat added test for #2416 d79c8a6
@hpbuniat hpbuniat referenced this issue Oct 21, 2011
Merged

Fix for #2416 #2492

@timmywil timmywil pushed a commit that referenced this issue Oct 24, 2011
@hpbuniat hpbuniat second attempt to fix #2416 ba93369
@timmywil timmywil pushed a commit that referenced this issue Oct 24, 2011
@hpbuniat hpbuniat fixed typo (+ -> -) to fix #2416 f7ec1a0
@timmywil timmywil pushed a commit that referenced this issue Oct 24, 2011
@hpbuniat hpbuniat added test for #2416 8889eb9
@gseguin gseguin closed this Oct 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.