#729 closed defect (fixed)
SlugFields and local characters
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When I use prepopulate_from with a SlugField, and use swedish characters (å, ä and ö), these characters are used in the SlugField, but when I press submit, the admin tells me that the SlugField contains illegal characters.
The admin is right in this case. The ideal solution would be to convert letters like å and ä to a, ö to o and so on, but a simpler solution would be to simply remove them. In any case: they shouldn't be there.
This is of course also true for many other languages, and would be good if it worked better. Personally, I added three replace-lines to urlify.py, but I suspect that solution sucks, is slow, and not very extendable.
(In [1097]) Fixed #729 -- prepopulate_from (urlify.js) now removes characters that aren't a-z, 0-9 or spaces