steve8x8 / geotoad

Geocaching query tool written in Ruby
https://buymeacoffee.com/steve8x8
Other
28 stars 8 forks source link

Clickable pictures #352

Closed steve8x8 closed 6 years ago

steve8x8 commented 6 years ago

Release 3.27.2 got delayed due to an issue with links of the kind <a href="link" ...><img src="image" alt="text" ...>more</a> which doesn't get represented properly in (c)gpx output. The idea behind rewriting images into links was to save bandwidth on mobiles, offering the user the option to load images, or follow links, if absolutely required. The above syntax shows up for geochecker links, where the image will show the current counter and the link itself opens a browser window. Obviously, converting this into something like (modulo encoding) <a href="link" ...>[= <a href="image">[* text: imagex *]more</a> linkx =]</a> will result in nested <a>'s which don't work (and are closed at the first </a> tag).

A new approach, which doesn't result in nesting, is required before the new version can be released.

What about moving the href link to the closing tag, thereby setting the <img> free for converting into another hyperlink? <a href="image">[* text: imagex *]</a>more<a href="link" ...>[= linkx =]</a>

steve8x8 commented 6 years ago

Still wondering how to handle links in log entries, for different output formats...

steve8x8 commented 6 years ago

For c:geo compatible GPX, this issue is believed to be fixed - it's still somewhat tricky to get the right link, but that's the price for not having to have a network connection (and not wasting bandwidth)...