Commit 219fb9d1 authored by Christian Hergert's avatar Christian Hergert

html-preview: use json.dumps() for markup conversion

Certainly better for most scenarios. May need further tweaking by someone
who cares enough to track down what marked.js is doing.

Fixes #1244
parent e6437be7
Pipeline #192976 passed with stage
in 46 minutes and 48 seconds
......@@ -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'),
......@@ -443,7 +443,7 @@ class HtmlPreviewPage(Ide.Page):
<script>var str="%s";</script>
<script>var str=%s;</script>
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