Cgeo: Relative URL for picture not processed correctly

Created on 23 Oct 2017  路  3Comments  路  Source: cgeo/cgeo

Detailed steps causing the problem:
  • Open GC7DAY8 in c:geo
  • There are three similar texts in german/english/greece, all containing the same hyperlink to GPSies behind a picture/icon
  • The link in the greek text was changed to use a relative URL for the link picture:
<a href="https://www.gpsies.com/map.do?fileId=oodfmwxuyqjxoglk" title="GPSies - Hike through Skoutoulijaris Canyon"><img src="//www.gpsies.com/images/linkus.png" border="0" alt="GPSies - Hike through Skoutoulijaris Canyon" /></a>

while the others use absolut URLs:

<a href="https://www.gpsies.com/map.do?fileId=oodfmwxuyqjxoglk" title="GPSies - Hike through Skoutoulijaris Canyon"><img src="https://www.gpsies.com/images/linkus.png" border="0" alt="GPSies - Hike through Skoutoulijaris Canyon" /></a>
Actual behavior after performing these steps:

c:geo is not showing the picture of this link if https:// is omitted

Expected behavior after performing these steps:

Picture should be shown

Version of c:geo used:

2017.10.23-NB

Is the problem reproducible for you?

Yes

Other comments and remarks:

Not sure, whether this should work according to standards, but it works in Firefox and that was the "official" link provided by the target site gpsies.com

Bug Prio - Low

Most helpful comment

It's how c:geo tries to convert relative URLs to absolute URLs and doesn't take scheme relative URLs into account.

All 3 comments

This is a perfectly valid URI as defined by RFC 3986 and c:geo should handle it properly. But I assume that this is actually a bug in Android/webview.

Hmm... actually this might be a consequence of the protocol-less relative URI. The content is not fetched via an absolute URI (it is just there) and thus has no protocol which can be used as a base for the relative URI of the image.

It's how c:geo tries to convert relative URLs to absolute URLs and doesn't take scheme relative URLs into account.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

king-ton picture king-ton  路  7Comments

chstdu picture chstdu  路  3Comments

pstorch picture pstorch  路  4Comments

samueltardieu picture samueltardieu  路  5Comments

smico picture smico  路  7Comments