On Wed, Jul 7, 2010 at 8:27 AM, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Wed, Jul 7, 2010 at 4:00 AM, C. Alan Zoppa <alan.zo...@gmail.com> wrote: >> I occasionally enter special characters as HTML entities (e.g. “, >> ®, etc.) in an object's title. I feel that slugify() would be more >> useful if these were removed entirely from the returned slug. For example: >> At the moment, a title of “Object Title ” returns the slug >> "ldquoobject-titlerdquo." It is my opinion that "object-title" would be more >> useful in this situation. > > I can't think of any way that ldquo et al could be considered helpful > in a slug, so yes -- this sounds like a bug to me.
Storing HTML (or other markup) in strings is meaningful, but I don't see how slugify can generally correct for format-to-slug. If you want no-HTML slugs, how about: === from django.template.defaultfilters import slugify from django.utils.html import strip_entities slug = slugify(strip_entities(your_html)) === ? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.