mjtorn/mezzanine-categorylink — pull request #1 by uranusjr (2013-06-07 03:23:33+00:00)
Title: Make CategoryLink play nicely with other pages

Django's `reverse` automatically escapes URLs, so when we get CategoryLink's slug from `get_absolute_url` (which in turn uses `reverse`) we get an escaped URL, while Mezzanine basically uses unescaped URLs everywhere. This becomes a problem when you try to compare slugs with each other, like when using the `is_current_or_ascendant` method.

I add an extra `unquote` call to convert the slug back as unescaped, and ensure that it starts and ends with `/` so that it is absolutely compatible with other slugs in Mezzanine.