diff --git a/pelicanconf.py b/pelicanconf.py index a487901..768cf07 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -68,7 +68,6 @@ MD_EXTENSIONS = [FontAwesomeExtension(), 'codehilite(css_class=highlight)', 'ext import filters JINJA_FILTERS = { "datetime": filters.format_datetime, - "raw": filters.html_to_raw, "category_find": filters.category_find, "limit": filters.limit } diff --git a/plugins/filters.py b/plugins/filters.py index 1e3e4ec..a778c89 100644 --- a/plugins/filters.py +++ b/plugins/filters.py @@ -1,18 +1,10 @@ import iso8601 -from bs4 import BeautifulSoup def format_datetime(value): return iso8601.parse_date(str(value)).strftime("%x") -def html_to_raw(html): - soup = BeautifulSoup(html, "html.parser") - for script in soup(["script", "style"]): # Remove script / style tags - script.extract() - return soup.get_text() - - def category_find(categories, name): for category_name, articles in categories: if category_name == name: