\d in urls examples in documentation is missleading.
|Reported by:||tomwys||Owned by:||chris cauley|
|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:4 Changed 3 years ago by
|Triage Stage:||Unreviewed → Accepted|
|Type:||Uncategorized → Cleanup/optimization|