Hex-encoded ampersand characters in game names are now converted correctly when scraping with ScreenScraper.

This commit is contained in:
Leon Styhre 2023-01-30 19:41:24 +01:00
parent f23b5a6c6e
commit 886f368fd9

View file

@ -351,6 +351,8 @@ void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc,
{region, "wor", "us", "ss", "eu", "jp"})
.text()
.get()};
// Game names sometimes contain ampersands encoded as hex codes.
gameName = Utils::String::replace(gameName, "&", "&");
// In some very rare cases game names contain newline characters that we need to remove.
result.mdl.set("name", Utils::String::replace(gameName, "\n", ""));
LOG(LogDebug) << "ScreenScraperRequest::processGame(): Name: " << result.mdl.get("name");