remove trailing /'s

Created on 15 July 2022, over 2 years ago
Updated 2 August 2023, over 1 year ago

Problem/Motivation

I am using the simplify_menu twig extension to help build breadcrumb related navigation on a website. If a url request comes in with a trailing "/" the it doesn't match the menu link.

Steps to reproduce

This can best seen through using a debugger and watch the comparison in the simplifyLinks function of MenuItems.php
if($current_path == $simplifiedLink['url'])

Proposed resolution

rtrim any trailing /'s see from $current_path

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024