From fef523693184f852ff686493175e4932a54b7808 Mon Sep 17 00:00:00 2001 From: smilerz Date: Thu, 15 Apr 2021 09:53:45 -0500 Subject: [PATCH] decode url strings in text_parser --- cookbook/helper/mdx_attributes.py | 1 - cookbook/helper/recipe_html_import.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/helper/mdx_attributes.py b/cookbook/helper/mdx_attributes.py index 57eb44c1d..055546ef0 100644 --- a/cookbook/helper/mdx_attributes.py +++ b/cookbook/helper/mdx_attributes.py @@ -19,7 +19,6 @@ class StyleTreeprocessor(Treeprocessor): class MarkdownFormatExtension(markdown.Extension): - # md_ globals deprecated - see here: def extendMarkdown(self, md): md.treeprocessors.register( StyleTreeprocessor(), diff --git a/cookbook/helper/recipe_html_import.py b/cookbook/helper/recipe_html_import.py index f8ce33273..5834bd3ba 100644 --- a/cookbook/helper/recipe_html_import.py +++ b/cookbook/helper/recipe_html_import.py @@ -7,7 +7,7 @@ from cookbook.helper import recipe_url_import as helper from cookbook.helper.scrapers.scrapers import text_scraper from json import JSONDecodeError from recipe_scrapers._utils import get_host_name, normalize_string - +from urllib.parse import unquote def get_recipe_from_source(text, url, space): def build_node(k, v): @@ -72,6 +72,7 @@ def get_recipe_from_source(text, url, space): parse_list = [] html_data = [] images = [] + text = unquote(text) # text = normalize_string(text) try: