You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue found while while reviewing the list of modified files in SVN update status window.
Steps to reproduce:
Open a new entry in the temporary dictionary
Ine pattern field put "p:\a\very\long\path\to\my\project\root\folder\"
In replace field, put: "root\"
Leave other fields as they are, specifically leave the radio button type on "Anywhere"
Press OK
Actual behavior:
I get the following error message box:
Regular Expression error: "bad escape (end of pattern) at position 4".
Expected behavior:
When regular expression is not selected as entry type, I should be able to use backslash character normally in the dictionary replace field.
I should not get any message related to regexps if I have not selected "Regular expression" as dictionary entry type.
NVDA logs, crash dumps and other attachments:
Following debugWarning found in the log:
DEBUGWARNING - gui.speechDict.DictionaryEntryDialog.onOk (17:27:09.948) - MainThread (19688):
Could not add dictionary entry due to (regex error) : bad escape (end of pattern) at position 4
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
2022.4
Windows version:
Windows 10 20H2 (AMD64) build 19042.2364
Name and version of other software in use when reproducing the issue:
N/A
Other information about your system:
N/A
Other questions
Does the issue still occur after restarting your computer?
Yes
Have you tried any other versions of NVDA? If so, please report their behaviors.
Not tested but surely not new.
If NVDA add-ons are disabled, is your problem still occurring?
Yes
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Not tested;unrelated.
The text was updated successfully, but these errors were encountered:
Ah, yes. Though the pattern doesn't seem to matter in order to trigger the
error.
seanbudd
added
p4
https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
triaged
Has been triaged, issue is waiting for implementation.
labels
Feb 14, 2023
Fixes#14556
Summary of the issue:
Dictionaries do not allow to use backslash character normally in the replacement field when regexp is not selected as entry type. When such a character is used, a message box complaining of a regexp error appears.
Description of user facing changes
The user can use backslash in replacement field normally when entry type is not regexp
Error messages are more precise and more specific when entering erroneous values in the fields for a regexp entry
Description of development approach
When the entry type is not regexp, escape the replacement string
When entries are created:
filter exception on re.error instead of the too global Exception to catch only exceptions related to regexps
separate the try/except statement in two in order to indicate in which field the regexp error lies
In case of a regexp error, after validating "OK" in the message box, the field where the error lies is re-focused
Reports the regexp error only in case of entry type = regexp; in the other cases,re-raise the exception, in order not to catch unrelated exceptions, e.g. code bug.
Context
Issue found while while reviewing the list of modified files in SVN update status window.
Steps to reproduce:
p:\a\very\long\path\to\my\project\root\folder\
"root\
"Actual behavior:
I get the following error message box:
Expected behavior:
NVDA logs, crash dumps and other attachments:
Following debugWarning found in the log:
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
2022.4
Windows version:
Windows 10 20H2 (AMD64) build 19042.2364
Name and version of other software in use when reproducing the issue:
N/A
Other information about your system:
N/A
Other questions
Does the issue still occur after restarting your computer?
Yes
Have you tried any other versions of NVDA? If so, please report their behaviors.
Not tested but surely not new.
If NVDA add-ons are disabled, is your problem still occurring?
Yes
Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?
Not tested;unrelated.
The text was updated successfully, but these errors were encountered: