I utilize the hook_breadcrumb_alter to override and alter part of a breadcrumb on a custom page.

In one of the overrides I insert a custom url, with url query parameters. When the url is printed by the easy_breadcrumbs module the url is encoded and my query parameters are not printed correctly; ?id=3&reset=1 is turned into %3Freset%3D1%26id%3D3 for example.

So I made a patch that adds a checks if any query parameters are set and passes them in de l() function through the $options var. which than builds a correct link. This way the query parameters are always rendered correctly and not double encoded.

If I'm missing something, or did not utilize the easy_breadcrumbs module correctly, please do tell me!

Comments

wannesderoy created an issue. See original summary.

tatarbj’s picture

Assigned: Unassigned » tatarbj

Hey wannesderoy,

thanks for the issue and the patch!

For a quick reply i'd like to let you know i'm planning in the weekend to check it deeper but for the first look it seems a valid issue that is solved more-less by the patch :)
Let me get back to you in a few days!

@greg - Do we have something similar in 8.x? Maybe the issue will be there too, could you check it?

Bests,
Balazs.

jenlampton’s picture

Status: Needs review » Reviewed & tested by the community

This fix is working for me, thanks @wannesderoy!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, url_encoding_fix.patch, failed testing. View results

tatarbj’s picture

tatarbj’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new959 bytes

reroll and tests are done, commit's arriving now, till that time here is the patch :)

  • tatarbj committed 8ec30e8 on 7.x-2.x
    Issue #2923421 by tatarbj, wannesderoy, jenlampton: url with query...
tatarbj’s picture

Assigned: tatarbj » Unassigned
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.