Ask / Submit
11

Slashes & colons are replaced by gobbledegook in shared URLs

asked 2015-03-22 23:02:18 +0200

mdoube gravatar image

updated 2015-03-23 14:37:36 +0200

If I find a neat web page that I want to share with a friend by clicking the email button (e.g. anything on theguardian.com), then hit send, my friend receives a URL string with the : replaced with %3A and the / replaced with %2F. Now, I know what that is, and it's a pain to replace it to make the URL work. My friend who doesn't know what that is, just sees garbage and complains to me about a broken link.

Ideally, the URL string sent in the email body wouldn't have the special characters escaped.

edit retag flag offensive close delete

Comments

1 Answer

Sort by » oldest newest most voted
6

answered 2015-03-22 23:13:26 +0200

lakutalo gravatar image

updated 2015-07-08 23:47:15 +0200

Alternatively one could use the send button from the browser menu (bottom right), this works out fine.

Using the send button/mailto-link from inside the web site invokes the email app from a URL. This part is buggy imo, as it sends the URL string url-encoded.

Bug fix by Jolla should be: check if, or even expect url-encoded body when invoked from URL, do url-decode.

edit flag offensive delete publish link more

Comments

2

The workaround is fine - but the bug still exists for anyone who chooses the 'wrong' way to send an email. Unfortunately, in this case it's the handling of a mailto: field, like this one, that is problematic - because the URL is already escaped in the page HTML source, as far as I can tell.

<li class="social__item social__item--email" data-link-name="email"><a class="social__action social-icon-wrapper" title="Email" target="_blank" href="mailto:?subject=Paris%20smog%20forces%20authorities%20to%20get%20tough%20on%20traffic&body=http%3A%2F%2Fgu.com%2Fp%2F46pqm%2Fsbl" data-link-name="social top"><span class="u-h">Share via Email</span><span class="rounded-icon social-icon social-icon--email"><i class="i-share-email--white i"></i></span></a></li>
mdoube ( 2015-03-23 14:33:10 +0200 )edit
1

You are perfectly right. I was just suggesting an alternative to circumvent this bug (hopefully temporarily). The problem lies primarily in the invocation method by url handler, as you can see in the href argument from your comment. The body part simply has to be url-encoded, else it would not reach further than first blank.

Bug fix by Jolla should be: expect url-encoded body when invoked from URL, do url-decode.

If I had better documentation on how to edit/create url handlers (requested here: https://together.jolla.com/question/87490/possibility-to-add-a-url-handler-for-an-android-app/), I could deliver a solution at once.

lakutalo ( 2015-03-23 14:44:36 +0200 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2015-03-22 23:02:18 +0200

Seen: 275 times

Last updated: Jul 08 '15