openstreetmap / openstreetmap/mod_tile
Can't use semicolons (and therefore html entities) in per-style attribution
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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