This object is in archive! 

URLs in point descriptions (embraced as CDATA) are not displayed as links

Johannes Müller shared this problem 7 years ago
Solved

When I import POIs (Points of Interest) into Locus Map Pro (v3.20.1), URLs in the point description are not clickable.


The <desc> element is protected against misinterpretation with a CDATA section like this. The CDATA makes it easier to paste arbitrary content into the XML element.


    <desc><![CDATA[...]]></desc>


Here is an example of two points.


  1. <wpt lat="9.958177" lon="76.259345"> <name>Mattancherry Palace</name> <desc><![CDATA[https://goo.gl/maps/Y76pbbPFdJF2


    https://www.lonelyplanet.com/india/kochi-cochin/attractions/mattancherry-palace/a/poi-sig/1033656/1333945


    Mattancherry Palace was a generous gift presented to the Raja of Kochi, Veera Kerala Varma (1537–61), as a gesture of goodwill by the Portuguese in 1555. The Dutch renovated the palace in 1663, hence its alternative name, the Dutch Palace. The star attractions here are the astonishingly preserved Hindu murals, depicting scenes from the Ramayana, Mahabharata and Puranic legends in intricate detail.]]></desc> <sym><![CDATA[z-favorites]]></sym> <extensions> <gpxx:WaypointExtension> <gpxx:Address> <gpxx:StreetAddress>Mattancherry</gpxx:StreetAddress> <gpxx:City>Stadt</gpxx:City> <gpxx:PostalCode>682002</gpxx:PostalCode> </gpxx:Address> </gpxx:WaypointExtension> </extensions> </wpt>

    <wpt lat="9.957477" lon="76.259374"> <name>Pardesi Synagogue</name> <desc><![CDATA[https://goo.gl/maps/6tBrWkU7F9s


    https://www.lonelyplanet.com/india/kochi-cochin/attractions/pardesi-synagogue/a/poi-sig/1033659/1333945


    Originally built in 1568, this synagogue was partially destroyed by the Portuguese in 1662, and rebuilt two years later when the Dutch took Kochi. It features an ornate gold pulpit and elaborate hand-painted, willow-pattern floor tiles from Canton, China, which were added in 1762. It’s magnificently illuminated by Belgian chandeliers and coloured-glass lamps. The graceful clock tower was built in 1760. There is an upstairs balcony for women, who worshipped separately according to Orthodox rites. Note that shorts, sleeveless tops, bags and cameras are not allowed inside.]]></desc> <sym><![CDATA[z-favorites]]></sym> <extensions> <gpxx:WaypointExtension> <gpxx:Address> <gpxx:StreetAddress>Synagogue Lane</gpxx:StreetAddress> <gpxx:City>Kochi

    </gpxx:City> <gpxx:PostalCode>682002</gpxx:PostalCode> </gpxx:Address> </gpxx:WaypointExtension> </extensions> </wpt>



When I open a point, I cannot click on the links in the description (Beschreibung), beacuse they are treated as simple text. See screenshot:


LocusMapPro_POI_Description_with_uninterpreted_links


Please make Locus handle URLs in point descriptions as clickable links, even if the descriptions are embraced in a CDATA section in the source GPX.

Replies (7)

photo
2

Good day Johannes,

I do not consider this as an "issue", anyway agree that clickable links should be useful in most cases. Issue/feature will be implemented in next version. Thanks for "idea".

photo
1

Works perfectly in 3.21.0!


Thanks and Merry Christmas! :)

photo
1

It turned out that this feature works only if the description contains nothing but a single URL (Locus Pro 3.23.0). If you have a Point or a Track with a description containing both URLs and text, the URLs won't be neither highlighted nor made clickable.


I'd expect all URLs within descriptions to be clickable (and I'm missing this feature).

photo
1

Good day Johannes,

give me please some "sample file" I may use for a test and I'll look at it. Thanks

photo
1

I attached sample files to this comment (point and track).

photo
1

I think I found a bug. The sample track cannot be reimported into Locus, although it was exported from Locus Pro a minute ago.


The attached screenshot shows the error message.

photo
1

I cannot reproduce the bug, but I found out that exporting and re-importing a track can mess up the track description.


Steps to reproduce:


1)

Import the track attached to this comment and add the description from the txt file.


2)

Export, including descriptions.


3)

Delete the track in Locus to prevent a name collision during import.


4)

Re-import the exported track. Activate "Höhen eintragen" (fill-in heights).


Result: The description is missing line breaks, and the description text is doubled.

photo
1

Good day,

thanks for a file, I'll look at it.

To you issues:

- for re-import, use latest version where this problem may be fixed

- description: please read hint next to "Insert formatted description" in export screen

photo
1

With the latest version (3.23.1) the "export and re-import issue" is fixed! :) Thanks!

But the German translation for "Insert formatted description" ("inkl. Beschreibungen“) is wrong! It stands for "Include descriptions", which sounds as if that check mark remained unchecked, no descriptions would be exported at all.

Besides, I also find the English wording a little too harmless, if you consider the danger it involves if you plan to edit or import this file later. I think it should be more obvious that this option will break the compatibility of the GPX.


Compatibility of GPX should be considered sacred. This is what GPX (GPS Exchange Format) is about.

photo
1

Good day Johannes,

in your files is mess of html code and links without <a href=""> attribute.


If your description contains any html code, it needs to be all as html web page. If you extra content of description into single test.html file, you will see that link won't be clickable as well. So current behavior is perfectly correct.


About description ... result GPX is not broke. It just contain in description copy of statistics so after import back, it may double it's content. I'll think what is possible to do with it, cannot promise any change for now.

photo
1

The wrong German translation should be fixed IMO (see above). Correct would be "Mit formatierten Beschreibungen“ or shorter "Mit form. Beschreibungen“ or “Mit HTML-Beschreibungen“.

photo
1

Hello Johannes


Please post your german translation problem into: http://forum.locusmap.eu/index.php?topic=301

So we can talk about on right place...

thx

photo
1

Currently, I am not able to login into the other forum at http://forum.locusmap.eu

  • My password is not accepted.
  • If I choose "If you've forgotten your login details, don't worry, they can be retrieved. To start this process please enter your username or email address below.", NO email arrives, even after 10 minutes. Yes, I also looked into the spam folder.
  • By the way: If you choose "Login with Google", a Google error message appears, saying "401. That’s an error. Error: invalid_client. The OAuth client was not found.", both with Firefox and Chrome.

I will try again later. Why are there two forums with different user directories at all?

photo
1

Thanks gynta!


Because You ( @Johannes ) are not the first who had problems with this unwanted re-import generated description, I've improved this system. In next version, generated description will be covered with html comment. When anyway will try to re-import this point/track back, generated description will be removed and only user's inserted text will be used as a valid description. Thanks for pushing me to do this .. finally.

photo
1

Thanks, Menion :)


Please also have a look at the line-breaks after re-importing the sample track & description after exporting them WITH formatted description (see attached files above).


Currently, the line-breaks of both the original text AND the second text (coming from the added HTML) have no line-breaks anymore then.


Interestingly, when you go on 'Edit' then, you can see correct-looking line-breaks in the edit mask. But as soon as you go back to the track detail view, the line-breaks are missing again.

photo
1

The attached screenshots show the missing line-breaks phenomenon.

photo
1

For the sake of completeness: I just added the German translation issue to http://forum.locusmap.eu/index.php?topic=301.msg47804#msg47804

photo
1

Johannes,

with latest Locus Map version, export and reimport still cause problems with description?

photo
2

Everything is working perfectly now. Thanks for fixing and asking again! That's exemplary!

photo
1

I recently noticed that names of cache child waypoints are no longer displayed after import.


Something like this works correctly:

<wpt lat="50.519067" lon="14.976917">

<name>QA18W1Z</name>

<desc>Nazev bodu</desc>

<sym>Virtual Stage</sym>

<type>Waypoint|Virtual Stage</type>

</wpt>


But when desc is enclosed in CDATA, the name is empty, like in the attached image. I have the latest version of application 3.24.1.

photo
1

Good day Norberto,

may you please attach here you source GPX file? Because cache "Tabulky" by default does not contain any waypoints. I need it for proper identification and fix o issue. Thank you.

photo
1

Thanks Menion,

here is a sample GPX and a screenshot of the result. It's a different cache, but a much smaller GPX which should make debugging easier.


Thanks, Norbert

photo
1

Good day Norberto,

thank you very much for a helpful GPX file. Issue found and fixed!

Replies have been locked on this page!