#27781 closed Bug (fixed)
simplify_regex() doesn't remove ? characters
| Reported by: | Mariusz Felisiak | Owned by: | Mariusz Felisiak |
|---|---|---|---|
| Component: | contrib.admindocs | Version: | 1.11 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
django.contrib.admindocs.views.simplify_regex leaves outstanding regex characters, e.q.
>>> simplify_regex(r'^a/?$') '/a/?'
instead of
>>> simplify_regex(r'^a/?$') '/a/'
Regression in f0ef0c49e9284f262fbc63e8a497699ca4a248fe (see ticket #26621).
I'm not sure it's a bug or intentional behavior change.
Attachments (1)
Change History (7)
by , 9 years ago
| Attachment: | 27781.diff added |
|---|
comment:1 by , 9 years ago
| Summary: | simplify_regex → simplify_regex leaves outstanding regex characters |
|---|
comment:2 by , 9 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|---|
| Type: | Uncategorized → Bug |
comment:6 by , 9 years ago
| Summary: | simplify_regex leaves outstanding regex characters → simplify_regex() doesn't remove ? characters |
|---|
Note:
See TracTickets
for help on using tickets.
I think that's an inadvertent change due to lack of test coverage for the
.replace('?', '')removal.