pablobm left a comment (openstreetmap/openstreetmap-website#6613)

I hoped the test would explain, but it didn't :sweat_smile: I went and had a 
look. I think I understand now:
- Changeset tag values go through tag2link.
- tag2link feeds from this list: 
https://github.com/JOSM/tag2link/blob/master/index.json
- Each separate tag in a `hashtags` key in a changeset gets applied this 
substitution rule:
```
  {
    "key": "Key:hashtags",
    "url": "https://resultmaps.neis-one.org/osm-changesets?comment=$1";,
    "source": "osmwiki:P8",
    "rank": "normal"
  },
```
- That link expects the text to replace `$1` not to have a hashtag.
- But we apply the substitution verbatim, passing the hashtag.
- We need to remove the hashtag for that substitution to work, which is what 
you are doing here.

Your solution would fail if we had a similar tag2link rule that did expect the 
`#`, as it applies to all rules, not only `Key:hashtags`. Do we know of any 
such rule? I'm guessing the probability is low, as `#` has a special meaning in 
URLs as you say.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6613#issuecomment-3666315395
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6613/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to