A small bug in embedded links

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

A small bug in embedded links

IanW15
I have discovered a small bug in the embedded links. There is an easy workaround but it might catch others unexpectedly so I thought it worth mentioning. If you put an embedded link to a web page and that link has a space in the name, e.g. 'http://mydomain/Event Name' then when you click the link on an iPhone it crashes the MapRun app. It doesn't happen on Android devices. The workaround is to use http://mydomain/Event%20Name. I tested with a very minimal 'Hello World' webpage to eliminate other causes.

I thought maybe it was because the URL was being truncated at the space and so an unknown URL would also crash but strangely this produces the expected 404 error, a bit odd.

Opening the URL using Safari works fine. I'm not sure if MapRun uses an interface to the default browser or a (flutter?) web page display library but it looks like there is a minor bug in there somewhere.
Reply | Threaded
Open this post in threaded view
|

Re: A small bug in embedded links

Peter Effeney
Administrator
Ian,

Thanks for the report. Can you tell me where you are seeing the URL for a MapRunLink without the %20 escape please.

In the MapRun Console where the MapRunLink is provided, the intention is to give a fully "URL-encoded" link as shown in the attached image.... to avoid the issue you mention. Note this only affects MapRun version 7+ (ie the second link on the page).



Peter
Reply | Threaded
Open this post in threaded view
|

Re: A small bug in embedded links

IanW15
Peter,
Sorry I probably didn't explain this very well. It isn't an existing event URL it is a URL I put into the meta information to appear as a link, from the 'information' symbol on the app main page, to a results page on a club website.

Given MapRun is usually happy with unescaped spaces in event names I had used them in the link. As I said, it works fine on an Android phone but actually crashes the MapRun app - i.e. exits it completely - on iOS. I might have expected a 404 not found error because it had truncated the URL at the space but a crash seems a bit odd, particularly as a non-existent URL does give a 404.

As I said it isn't a big issue because there is an easy workaround but I thought it worth mentioning because I can imagine it puzzling people. I initially thought it must be javascript code in the results page which was causing the crash.
Ian
Reply | Threaded
Open this post in threaded view
|

Re: A small bug in embedded links

IanW15
Peter,
I should probably also have mentioned that if I click on 'Get URLs for these links' on the edit metadata page, for an event with spaces in its name, those URLs also appear without escapes. This tends to reinforce the impression that they are OK.
Ian
Reply | Threaded
Open this post in threaded view
|

Re: A small bug in embedded links

Peter Effeney
Administrator
Ian,

Thanks for the further information.

I conclude that what you are reporting is that in the MapRun Console, the function to Edit Metadata, when displaying the URL's to copy for a website, shows the un-escaped version of the URLs and it would be better to display the escaped version of the URLs.

Let me know if I have misunderstood. Otherwise I'll change that in the next version of the MapRun Console.

Thanks again.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: A small bug in embedded links

IanW15
Peter,
No, the problem occurs when you put a link in the metadata to appear within the app as shown in the image. Unless the space is escaped i.e. Event%20Name then the MapRun app will crash - exit completely - if the link is followed on an iPhone - but works OK on Android. I was just quoting the 'Get URLs' button results as an example which might lead to people thinking spaces were OK.
Ian

Reply | Threaded
Open this post in threaded view
|

Re: A small bug in embedded links

Peter Effeney
Administrator
Ian,

Thanks for taking the time to show me an example.

I'll fix that in the next version (as well as the 'Get URLs').

Thanks again.

Peter