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

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

Comments

Projects
None yet
3 participants
@ntankovic

Searching for character '*' results in Javascript exception:

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

@gseguin

This comment has been minimized.

Show comment
Hide comment
@gseguin

gseguin Sep 19, 2011

Member

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

Member

gseguin commented Sep 19, 2011

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

hpbuniat added a commit to hpbuniat/jquery-mobile that referenced this issue Sep 19, 2011

@hpbuniat

This comment has been minimized.

Show comment
Hide comment
@hpbuniat

hpbuniat Sep 19, 2011

Contributor

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

Contributor

hpbuniat commented Sep 19, 2011

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

hpbuniat added a commit to hpbuniat/jquery-mobile that referenced this issue Sep 20, 2011

hpbuniat added a commit to hpbuniat/jquery-mobile that referenced this issue Sep 23, 2011

@hpbuniat hpbuniat referenced this issue Oct 21, 2011

Merged

Fix for #2416 #2492

@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