When using a token to generate a path, the resulting URL contains 'http:/' as with only a single slash. All browsers (other than Safari) interpret this as not containing the domain. So the browsers remove the colon and add the domain redundantly to the front of the URL, thus rendering it unusable.
The issue seems to center in the _custom_breadcrumbs_create_crumb_items() function of this module, which contains a preg_replace() command that removes all double-slashes indiscriminately. See below:
$original_path = preg_replace('/\/+/', '/', $original_path);
A better regular expression would only combine double-slashes that don't follow a colon:
$original_path = preg_replace('/[^:](\/\/+)/', '/', $original_path);
Comment | File | Size | Author |
---|---|---|---|
#1 | qualify_double_slashes-2151579-1.patch | 757 bytes | tomogden |
Comments
Comment #1
tomogden CreditAttribution: tomogden commentedSee patch attached.
Comment #2
tomogden CreditAttribution: tomogden commentedComment #3
bebelg CreditAttribution: bebelg commentedThank you tomogden
It correct one big error on my website
Comment #4
Proteo CreditAttribution: Proteo as a volunteer commentedThanks for the fix, I just found the bug and came here to report it. The patch fixes the issue for me, I guess it's time to move it to RTBC?
Comment #5
surfgatinho CreditAttribution: surfgatinho as a volunteer commentedWorks for me.
Any chance of getting this committed?
Comment #6
Summit CreditAttribution: Summit as a volunteer commentedHi, is this patch committed please? Or is this module not maintained anymore? thanks for replying in advance, greetings Martijn
Comment #8
lamp5True, commited.