| Summary: | Should escape regexp when populating 'Find' field | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> | ||||
| Component: | Editor | Assignee: | Silenio Quarti <Silenio_Quarti> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | Silenio_Quarti | ||||
| Version: | 0.5 | ||||||
| Target Milestone: | 4.0 M2 | ||||||
| Hardware: | PC | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 232661 [details]
fix
Previous patch was escaping all search strings even if it did not come from a editor selection. I think only the editor selection should be escaped. Fixed http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6c54b62775a6e5a8968cf80c6f1f65fe77599ae3 |
1. Open a file in the editor. 2. Press Ctrl+F to open Find toolbar, enable Options > Regular Expression. 3. Select some text that contains a regex special character. For example: removePrefix( 4. Press Ctrl+F to populate the Find field with the selection. I expected the regexp character to be escaped as \( so I could search for the selection literally. Instead I see it's not escaped, which means the search will fail.