openstreetmap / openstreetmap/mod_tile

Can't use semicolons (and therefore html entities) in per-style attribution

Open
#33 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
318
Forks
199
PR merge metrics
No merged PRs in 30d

Description

The default attribution can be interpreted as html, e.g. when shown in tilejson output

https://github.com/openstreetmap/mod_tile/blob/master/mod_tile.h#L32

It can be overwritten per-style in renderd.conf

https://github.com/openstreetmap/mod_tile/blob/master/renderd.conf#L38

However, this doesn't work if you have any semicolons in your override string, e.g. for ampersands, copyright entities or similar. The role of semicolons in .ini files seems to be implementation-specific as to whether they are a comment delineator only at the start of the line, only when preceded by whitespace, or at any point during the line. Additionally, escape sequences (typically backslash, e.g. ; ) are implementation-specific. At the moment, we have an anywhere-no-escape parser.

Perhaps we need a different ini parser, or a different configuration file format.

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

Compare the attribution definitions in mod_tile.h and renderd.conf, then trace how the per-style value is parsed before it appears in TileJSON output. Determine how semicolons and HTML entities should be represented without being treated as comments. Done means per-style attribution accepts these values reliably and the chosen configuration approach is validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.