From 2f3f45151d306cd2dee881b34e9f46b4b4daccd7 Mon Sep 17 00:00:00 2001 From: truePhilipp Date: Mon, 6 May 2024 21:07:59 +0200 Subject: [PATCH] removed quot replacement --- html_to_django/formatters/style_formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html_to_django/formatters/style_formatter.py b/html_to_django/formatters/style_formatter.py index 8a8c843..7ad95c5 100644 --- a/html_to_django/formatters/style_formatter.py +++ b/html_to_django/formatters/style_formatter.py @@ -27,7 +27,7 @@ def style_to_string(style: dict[str, str]) -> str: def format(soup: BeautifulSoup) -> None: for element in soup.find_all(attrs={"dj-style": True}): style = parse_style(element["style"]) - dj_style = element.get("dj-style").replace(""", '"') + dj_style = element.get("dj-style") for name, value, value_type in [declaration.split(";") for declaration in dj_style.split("~") if declaration]: style[name] = f"{{{{ {value} }}}}{value_type}" element["style"] = style_to_string(style)