diff --git a/src/plugins/html-preview/html_preview.py b/src/plugins/html-preview/html_preview.py index 4f072d59b55f70111388eedafbeffc459c330e34..f6c3e31cee17fbac5c5c97ecc40fc35ac9541283 100644 --- a/src/plugins/html-preview/html_preview.py +++ b/src/plugins/html-preview/html_preview.py @@ -21,8 +21,8 @@ import builtins import gi -import html import io +import json import locale import os import shutil @@ -435,7 +435,7 @@ class HtmlPreviewPage(Ide.Page): def get_markdown(self, text): params = (HtmlPreviewData.MARKDOWN_CSS.get_data().decode('UTF-8'), - html.escape(text).replace('\n', '\\n'), + json.dumps(text), HtmlPreviewData.MARKED_JS.get_data().decode('UTF-8'), HtmlPreviewData.MARKDOWN_VIEW_JS.get_data().decode('UTF-8')) @@ -443,7 +443,7 @@ class HtmlPreviewPage(Ide.Page): - +