﻿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
36569	Asymmetric quoting/unquoting of object_ids in ModelAdmin urls breaks with CharField primary keys	LeGast00n		"== Problem ==
The Django admin consistently applies `quote()` when generating URLs for `object_id`, 
but the inverse unquoting is not applied everywhere during or after URL resolution.

For models with a `CharField` primary key containing characters such as `_`, 
the ChangeList → Change view object links may break, since the value is escaped in the URL 
but not properly decoded on request handling.

== Steps to reproduce ==
 1. Define a model with a `CharField` as the primary key, allowing `_` in its values.
 2. Register it in the Django admin.
 3. Go to the changelist and click the link to a change view.

== Observed ==
 * The URL is generated with `quote()` escaping.  
 * Resolution fails for pks bearing quoted characters, e.g. in changelist links, delete view, or custom admin URLs.

== Workarounds ==
 * Overriding `change_view` / `delete_view` to apply unquoting before calling `super()` works in some cases.
 * For custom admin URLs the problem happens earlier, during URL resolution itself, leaving no straightforward workaround.

== Expected ==
Wherever `quote()` is used to build admin URLs, the corresponding unquoting 
should also be applied consistently during URL resolution, including for custom admin routes."	Bug	new	contrib.admin	5.2	Normal		url generation resolution escaping	LeGast00n	Unreviewed	0	0	0	0	0	0
