From ceeee46631acc6e25a445218965521a97cf58462 Mon Sep 17 00:00:00 2001 From: Baptiste Mispelon Date: Sun, 10 Nov 2013 00:26:02 +0100 Subject: [PATCH] Fixed bug when an item has / as an URL. --- django_activeurl/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_activeurl/utils.py b/django_activeurl/utils.py index 10dcfea..b62fd38 100644 --- a/django_activeurl/utils.py +++ b/django_activeurl/utils.py @@ -51,7 +51,7 @@ def check_active(url, element, full_path, css_class, menu): # compare full_path with href according to menu configuration if menu: # skip "root" (/) url, otherwise it will be always "active" - if href != '/': + if href != '/' or full_path == '/': # start with logic logic = full_path.startswith(href) else: