\d in urls examples in documentation is missleading.
|Reported by:||tomwys||Owned by:||chriscauley|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
\d with re.UNICODE flag allows to use digits like "१". This flag is used when parsing Django urls.
For example, regexp like that (https://docs.djangoproject.com/en/dev/topics/http/urls/#example):
will accept "articles/११११/". This is missleading for developer. It could also be harmful. If developer will use string parsed like that in other way than parsing to int(), it could lead to error or even security issue.
Change History (8)
comment:1 Changed 23 months ago by timo
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:3 in reply to: ↑ 2 Changed 23 months ago by tomwys
comment:4 Changed 23 months ago by timo
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Cleanup/optimization
comment:7 Changed 22 months ago by chriscauley
- Owner changed from nobody to chriscauley
- Status changed from new to assigned