Unescapes HTML encoding from game description

This commit is contained in:
Yarne Coppens 2024-08-11 10:44:35 +02:00
parent 2c26e87ec5
commit 58746833bd

View file

@ -6,6 +6,7 @@ from datetime import datetime
import time
import math
from typing import Union
import html
from src.classes import boardgame_classes, play_classes
from src.modules import auth_manager
@ -74,7 +75,7 @@ def convert_xml_to_boardgame(boardgame_xml: ET.Element) -> boardgame_classes.Boa
"id" : int(boardgame_xml.get('id')),
"name" : boardgame_xml.find('name').get('value'),
"weight": boardgame_xml.find('statistics').find('ratings').find('averageweight').get('value'),
"description" : boardgame_xml.find('description').text,
"description" : html.unescape(boardgame_xml.find('description').text),
"image_url" : boardgame_xml.find('image').text,
"thumbnail_url" : boardgame_xml.find('thumbnail').text,
"year_published" : int(boardgame_xml.find('yearpublished').get('value')),