| 345 | } |
| 346 | |
| 347 | std::string MetadataTagProcessorImpl::ValidateAndFormat_panoramax(std::string v) |
| 348 | { |
| 349 | static auto const s_panoramaxRegex = std::regex(R"(^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$)"); |
| 350 | |
| 351 | if (std::regex_match(v, s_panoramaxRegex)) |
| 352 | return v; |
| 353 | url::Url const parsedUrl = url::Url::FromString(v); |
| 354 | if (std::string const * paramValue = parsedUrl.GetParamValue("pic")) |
| 355 | { |
| 356 | if (std::regex_match(*paramValue, s_panoramaxRegex)) |
| 357 | { |
| 358 | if (std::string const * xyzValue = parsedUrl.GetParamValue("xyz")) |
| 359 | { |
| 360 | return *paramValue + "&xyz=" + *xyzValue; |
| 361 | } |
| 362 | return *paramValue; |
| 363 | } |
| 364 | } |
| 365 | LOG(LDEBUG, ("Invalid Panoramax tag value:", v)); |
| 366 | return {}; |
| 367 | } |
| 368 | |
| 369 | std::string MetadataTagProcessorImpl::ValidateAndFormat_rooms(std::string const & v) |
| 370 | { |
nothing calls this directly
no test coverage detected