RegEx search breaks with some characters

Bug #727181 reported by elpres
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scribes
Fix Committed
Medium
Mystilleef

Bug Description

Do a regular expression search for ")" (without quotes). When you click "Find", the button's caption changes to "Stop", the input box is disabled. Clicking "Stop" will change the caption back to "Find", but the input box remains disabled and doesn't become usable again until you close the current window.

The console displays the following error:
------------------
Traceback (most recent call last):
  File "/usr/lib/scribes/GenericPlugins/SearchSystem/RegexCreator.py", line 36, in __pattern_cb
    self.__regex_object(pattern)
  File "/usr/lib/scribes/GenericPlugins/SearchSystem/RegexCreator.py", line 27, in __regex_object
    regex_object = compile_(pattern, flags)
  File "/usr/lib/python2.6/re.py", line 190, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.6/re.py", line 245, in _compile
    raise error, v # invalid expression
sre_constants.error: unbalanced parenthesis
------------------

The reason here is the obviously invalid RegEx with an unescaped parenthesis, which is up to the user to get right, but the editor should handle it gracefully and make the input field editable again to give the user the opportunity to correct their mistake.

Version: 0.4-dev-build899 on Ubuntu Maverick

Revision history for this message
Mystilleef (mystilleef) wrote : Re: [Bug 727181] [NEW] RegEx search breaks with some characters

 assignee mystilleef
 status triaged
 importance medium

Changed in scribes:
assignee: nobody → Mystilleef (mystilleef)
importance: Undecided → Medium
status: New → Triaged
Mystilleef (mystilleef)
Changed in scribes:
status: Triaged → In Progress
Mystilleef (mystilleef)
Changed in scribes:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.