Maps icon indicating copy to clipboard operation
Maps copied to clipboard

Marker popup text with = or ; breaks map display

Open Eoord opened this issue 4 years ago • 6 comments

Setup

  • Maps version: 7.20.1
  • MW version: 1.31
  • PHP version: 7.3
  • SMW version (if applicable): 3.1.6

Issue

When displaying a map with markers, the map fails if the popup text of one of the markers contains either an equal-sign (=) or semicolon(;). There may be other forbidden characters such as ~.

This may have been fixed already in the latest version but I did not find this in the release notes.

Steps to reproduce the observation (recommendation is to use the sandbox):

Works: {{#display_map: Amsterdam~The city Amsterdam~Amsterdam is the capital of The Netherlands~Green-marker.png }}

Fails: {{#display_map: Amsterdam~The city Amsterdam~Amsterdam = the capital of The Netherlands~Green-marker.png }}

Resolution

Allow to use quotes to avoid misinterpreting special characters. {{#display_map: Amsterdam~The city Amsterdam~"Amsterdam = the capital of The Netherlands"~Green-marker.png }}

Eoord avatar Sep 20 '21 09:09 Eoord

You can put the description into a template. Or just the equals sign.

{{#display_map: Amsterdam~The city Amsterdam~Amsterdam {{equals}} the capital of The Netherlands~Green-marker.png }}

JeroenDeDauw avatar Sep 20 '21 11:09 JeroenDeDauw

Thanks for your reply Jeroen.

I tried that but unfortunately it didn't work.

Eoord avatar Sep 20 '21 14:09 Eoord

Did you create the template?

JeroenDeDauw avatar Sep 20 '21 17:09 JeroenDeDauw

Yep, I did. See attachment.

afbeelding

Eoord avatar Sep 21 '21 06:09 Eoord

I'm also running into this. Might start a branch and start working on a fix but don't have the time to work on it for a few days yet.

Madwonk avatar Feb 25 '22 00:02 Madwonk

Also a problem for me if I want the popup text to be a URL of the form [https://www.google.com/search?kgmid=/g/11bv3054r4 google]. This is within {{#display_map. Its not a problem for <display_map>, but I can't use the latter because the lines are generated by {{#display_external_table from the ExternalData extension, which seems incompatible with the latter form

ETA. Oddly, while a {{eq}} template containing an '=' does not work, an {{eq}} template returning {{{1}}}={{{2}}} and called with {{eq{{!}}before{{!}}after}} returns 'before=after' in a map

jrbray1 avatar May 06 '24 13:05 jrbray1