Added conversion of an additional HTML character code when scraping using ScreenScraper

This commit is contained in:
Leon Styhre 2024-02-07 22:19:06 +01:00
parent 2822cadc1f
commit 3da749c5e3

View file

@ -397,6 +397,7 @@ void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc,
// Translate some HTML character codes to UTF-8 characters for the game name.
gameName = Utils::String::replace(gameName, " ", " ");
gameName = Utils::String::replace(gameName, "&", "&");
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", ""));
@ -453,6 +454,7 @@ void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc,
description = Utils::String::replace(description, """, "\"");
description = Utils::String::replace(description, "©", "©");
description = Utils::String::replace(description, "'", "'");
description = Utils::String::replace(description, "'", "'");
result.mdl.set("desc", description);
}