idlesign/django-sitetree

Tree items not displayed in menu if url contains certain special characters

sandracioc opened this issue · 4 comments

Hello, my nav menu is made up of a main title(home page) at the top and a few tree items.
When I try to access a page in which the url contains at least one special character, the tree items are not shown anymore in the menu, just the main title.

Some special characters that I found interfering with the correct display of the menu are: = + { } ( ) : ; '
But these characters don't interfere: [ ] ? < > |
I should mention my url regex is set to include all of the characters above.

I tried replacing the characters in the url with their ASCII equivalents but nothing changed.

Been having this issue for a long time and I really don't know what could be causing it.

Thanks in advance for your help.

Hi,

Please provide:

  • tree items definitions
  • an urlpattern you use
  • an URL to reproduce (by the way, is it urlencoded?)

Hello,

Tree items definitions:

TitleURL
HOMEprivate
|— Aboutabout
|— Reportsreports
|— Reports |— Productsproducts
|— Reports |— Products |— Devicesproducts:devices
|— Reports |— Products |— Devices |— Devices {{ grp }}products:devices_grp grp

URL pattern: r'^devices/(?P<grp>([() 0-9a-zA-Z!*:.?+=_-])+)$'

URL: /private/products/devices/Device10x 45.9(2)S5/ It is not urlencoded.

Thank you.

That was an old one indeed %) Thank you for the report.
Seems to be fixed in master. You may want to give it a try.

Verified it and it's fixed. Thank you, @idlesign! Closing the issue.