diff --git a/geeknote/editor.py b/geeknote/editor.py index 9be7a66..8275c66 100644 --- a/geeknote/editor.py +++ b/geeknote/editor.py @@ -3,6 +3,7 @@ import os import sys import tempfile + from bs4 import BeautifulSoup, NavigableString import threading import hashlib @@ -16,6 +17,11 @@ from .log import logging from xml.sax.saxutils import escape, unescape +import warnings +from bs4.builder import XMLParsedAsHTMLWarning + +warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning) + class EditorThread(threading.Thread): def __init__(self, editor): @@ -84,7 +90,7 @@ def ENMLtoText( imageOptions={"saveImages": False}, imageFilename="", ): - soup = BeautifulSoup(contentENML, "xml") + soup = BeautifulSoup(contentENML, "html.parser") if format == "pre": #