Commit 0c9c77ea authored by Christian Hergert's avatar Christian Hergert

html-preview: use Python's html.escape()

Fixes #1244
parent 593435fb
Pipeline #190758 canceled with stages
in 28 minutes and 24 seconds
......@@ -21,6 +21,7 @@
import builtins
import gi
import html
import io
import locale
import os
......@@ -433,9 +434,8 @@ class HtmlPreviewPage(Ide.Page):
self.webview = None
def get_markdown(self, text):
text = text.replace("\"", "\\\"").replace("\n", "\\n")
params = (HtmlPreviewData.MARKDOWN_CSS.get_data().decode('UTF-8'),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment