ProfessionalWiki / ProfessionalWiki/Maps

Marker popup text with = or ; breaks map display

Open
#667 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
78
Forks
65
Avg merge
9h 17m
Merged PRs (30d)
6

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on the linked sandbox using the working and failing #display_map examples, then trace how marker popup text is parsed. Verify handling of quoted text containing = and ;, including the reported examples, and confirm that the map renders successfully without breaking existing unquoted text.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.