- Timestamp:
- 2020-06-11T20:03:41+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TaginfoAction.java
r16604 r16606 74 74 if (tagTable.getSelectedRowCount() == 1) { 75 75 final int row = tagTable.getSelectedRow(); 76 final String key = Utils.encodeUrl(tagKeySupplier.apply(row)).replaceAll("\\+", "%20");76 final String key = tagKeySupplier.apply(row); 77 77 Map<String, Integer> values = tagValuesSupplier.apply(row); 78 78 String value = values.size() == 1 ? values.keySet().iterator().next() : null; … … 112 112 public String getTaginfoUrlForTag(Tag tag) { 113 113 if (tag.getValue().isEmpty()) { 114 return taginfoUrl + "/keys/" + tag.getKey();114 return taginfoUrl + "/keys/" + encodeKeyValue(tag.getKey()); 115 115 } else { 116 return taginfoUrl + "/tags/" + tag.getKey() + '=' + Utils.encodeUrl(tag.getValue()).replaceAll("\\+", "%20");116 return taginfoUrl + "/tags/" + encodeKeyValue(tag.getKey()) + '=' + encodeKeyValue(tag.getValue()); 117 117 } 118 } 119 120 private static String encodeKeyValue(String string) { 121 return Utils.encodeUrl(string).replaceAll("\\+", "%20"); 118 122 } 119 123
Note:
See TracChangeset
for help on using the changeset viewer.