Page MenuHomePhabricator

<maplink>/<mapframe>: Allow Unicode letters for group and show parameters
Open, LowPublic

Description

<maplink> and <mapframe> tags can use group and show parameters in the Wikivoyage mode. group specifies a name for a pushpin-marker layer, and show names the groups to show.

In Kartographer Tag\Taghandler.php, function parseGroups(), group and show names are restricted to ASCII characters and numbers with a regular expression like $this->getText( 'group', null, '/^[a-zA-Z0-9]+$/' ).

I ask to allow all Unicode characters for i18n purposes because these group names are shown in the layer control of the map. It will be useful for non-Latin wikis but also for a lot of Latin wikis like German because of special characters like umlauts and several diacritics.

The map elements are added with 'ext.kartographer.box', addGeoJSONLayer( groupName, geoJson, [options] ) JavaScript function. This function accepts Unicode characters for groupName, too.