Changeset 19617 in josm


Ignore:
Timestamp:
2026-08-12T16:17:45+02:00 (70 minutes ago)
Author:
stoecker
Message:

fix #24841 - proper encoding of URL parameters in Tag2Link

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Tag2Link.java

    r19585 r19617  
    215215            final String formattedValue = valueFormatter.getOrDefault(key, x -> x).apply(value);
    216216
    217             final String urlKey = formatterUrls.stream().map(urlFormatter -> PATTERN_DOLLAR_ONE.matcher(urlFormatter)
     217            final String urlKey = Utils.encodeUrl(formatterUrls.stream().map(urlFormatter -> PATTERN_DOLLAR_ONE.matcher(urlFormatter)
    218218                            .replaceAll(Matcher.quoteReplacement("(.*)"))).map(PatternUtils::compile)
    219219                            .map(pattern -> pattern.matcher(value)).filter(Matcher::matches)
    220                             .map(matcher -> matcher.group(1)).findFirst().orElse(formattedValue);
     220                            .map(matcher -> matcher.group(1)).findFirst().orElse(formattedValue));
    221221
    222222            formatterUrls.forEach(urlFormatter -> {
Note: See TracChangeset for help on using the changeset viewer.