I'm using the nav_menu_link_attributes filter to change the behavior of a
specific post type. The first thing I noticed was that, in contrast to what
the documentation says on this, $item refers to the *menu* item, not to the
object to which it is linked.
But beyond that, it seems that despite the fact that I'm replacing the
'href' attribute of the link, something somewhere is adding a trailing
slash, which is messing up what I'm doing. Here's the code I'm using: