Maps
Maps copied to clipboard
Marker popup text with = or ; breaks map display
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 }}
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 }}
Thanks for your reply Jeroen.
I tried that but unfortunately it didn't work.
Did you create the template?
Yep, I did. See attachment.

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.
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