| 330 | } |
| 331 | |
| 332 | std::string MetadataTagProcessorImpl::ValidateAndFormat_wikimedia_commons(std::string v) |
| 333 | { |
| 334 | // Putting the full wikimedia url to this tag is incorrect according to: |
| 335 | // https://wiki.openstreetmap.org/wiki/Key:wikimedia_commons |
| 336 | // But it happens often enough that we should guard against it. |
| 337 | strings::ReplaceFirst(v, "https://commons.wikimedia.org/wiki/", ""); |
| 338 | strings::ReplaceFirst(v, "https://commons.m.wikimedia.org/wiki/", ""); |
| 339 | |
| 340 | if (v.starts_with("File:") || v.starts_with("Category:")) |
| 341 | return v; |
| 342 | |
| 343 | LOG(LDEBUG, ("Invalid Wikimedia Commons tag value:", v)); |
| 344 | return {}; |
| 345 | } |
| 346 | |
| 347 | std::string MetadataTagProcessorImpl::ValidateAndFormat_panoramax(std::string v) |
| 348 | { |
nothing calls this directly
no test coverage detected