Added support to ScreenScraper to interpret the HTML copyright character code.

This commit is contained in:
Leon Styhre 2021-03-22 20:32:54 +01:00
parent 2f0ef3f45c
commit f975468d3a

View file

@ -353,8 +353,11 @@ void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc,
std::string description = find_child_by_attribute_list(game.child("synopsis"),
"synopsis", "langue", { language, "en", "wor" }).text().get();
if (!description.empty())
// Translate some HTML character codes to UTF-8 characters.
if (!description.empty()) {
result.mdl.set("desc", Utils::String::replace(description, " ", " "));
result.mdl.set("desc", Utils::String::replace(description, "©", "©"));
}
// Get the date proper. The API returns multiple 'date' children nodes to the 'dates'
// main child of 'jeu'.