var removelist = [
"a", "an", "as", "at", "before", "but", "by", "for", "from", "is",
"in", "into", "like", "of", "off", "on", "onto", "per", "since",
"than", "the", "this", "that", "to", "up", "via", "with"
];
And when I try to slugify this text: "Kaupa miða"
The result becomes: "kaupa-mið"
This can be tested using the following line in console:
URLify("Kaupa miða", 255, true)
(only when urlify.js is loaded, of course)
--
Ticket URL: <https://code.djangoproject.com/ticket/28688>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28688#comment:1>
Comment (by Claude Paroz):
The solution could be to check if the string contains any non-ASCII char
and simply skip the `removelist` removal, as the language is probably not
English in that case.
--
Ticket URL: <https://code.djangoproject.com/ticket/28688#comment:2>
* owner: nobody => Sævar Öfjörð Magnússon
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28688#comment:3>
* has_patch: 0 => 1
Comment:
Pull request: https://github.com/django/django/pull/9219
--
Ticket URL: <https://code.djangoproject.com/ticket/28688#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28688#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"f90be0a83ef5aa333b19e259faab73ee117d5339" f90be0a8]:
{{{
#!CommitTicketReference repository=""
revision="f90be0a83ef5aa333b19e259faab73ee117d5339"
Fixed #28688 -- Made admin's URLify.js skip removal of English words if
non-ASCII chars are present.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28688#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"8b9a163afa553ee9d57febae69c9eb0c88259012" 8b9a163]:
{{{
#!CommitTicketReference repository=""
revision="8b9a163afa553ee9d57febae69c9eb0c88259012"
Refs #28688 -- Updated a selenium test for admin's URLify.js change.
English words aren't removed if non-ASCII chars are present.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28688#comment:7>