The markdown module performs some mangling for mail addresses to make it (slightly) harder for a spammer to read the address.
If you enter this:
Here is an email address: <support@example.com>
You get this:
<span class='print-link'></span><p>Here is an email address: <a href="mailto:support@example.com">support@example.com</a></p>
And this works fine in a web browser.
However, view the printer-friendly version of the page, and the source becomes this:
<div class="print-content"><p>Here is an email address: <a href="https://download.nuix.com/%2526%2523109%3B%2526%252397%3B%2526%2523x69%3...">support@example.com</a> <span class="print-footnote">[1]</span></p>
...
[1] https://download.nuix.com/%2526%2523109%3B%2526%252397%3B%2526%2523x69%3...
Basically the print module is performing an additional level of escaping, which is causing the URL to break as it is no longer a mailto: URL. I would expect this to break some other types of URL as well (anything containing character escapes which are already escaped), which is why I have titled this bug more generally.
Comments
Comment #1
brankoc commentedI can confirm this. A link with plusses in it gets translated to a link with spaces in it. For instance, "see+spot+run.pdf" becomes "see spot run.pdf".
The problem would seem to be the usage of urldecode() in print.pages.inc, for instance in the line:
$newurl = urldecode($url);.Comment #2
jcnventuraThanks for the report.
I've just committed a patch that checks URLs using html_entity_decode() to prevent processing this type of 'encryption'. I've also removed the unnecessary urldecode() calls and replaced it with a rawurldecode() in the only place where it is necessary.
João