id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 28936,simplify_regex should remove redundant escape sequences outside groups,Cristi Vîjdea,,"**django.contrib.admindocs.views.simplify_urls** should clean up escapes found outside path parameters. Otherwise, broken URLs with backslashes can be generated and displayed. This is readily apparent with Django 2's **path()**, which aggresively escapes everything outside a **** specifier, resulting in a urlpattern with backslash-escaped forward slashes: {{{ >>> simplify_regex(r""^(?P\w+)/athletes/(?P\w+)/$"") '//athletes//' >>> simplify_regex(r""^(?P\w+)\/athletes\/(?P\w+)\/$"") '/\\/athletes\\/\\/' }}} The second example is what **path()** would generate in urlpatterns. You can, for example, see this issue affecting django-rest-framework [https://github.com/encode/django-rest-framework/issues/5675 here].",Bug,closed,contrib.admindocs,2.0,Normal,invalid,simplify_regex path,ChillarAnand Carlton Gibson,Ready for checkin,0,0,0,0,0,1