mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 01:18:31 +02:00
fix unicode display in the browser
This commit is contained in:
parent
4a42ec20cb
commit
ee57119f0e
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@ import codecs
|
||||||
html_skeleton = '''
|
html_skeleton = '''
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||||
<title>%s</title>
|
<title>%s</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -45,7 +46,7 @@ def to_html(journal, open_in_browser=False):
|
||||||
"""renders the given journal to html
|
"""renders the given journal to html
|
||||||
and can open it in the default browser"""
|
and can open it in the default browser"""
|
||||||
bla = to_md(journal)
|
bla = to_md(journal)
|
||||||
html_body = markdown.markdown(bla.decode('utf-8'))
|
html_body = markdown.markdown(bla.decode('utf8'))
|
||||||
print html_body
|
print html_body
|
||||||
tmp_file = os.path.join(tempfile.gettempdir(), "pretty.html")
|
tmp_file = os.path.join(tempfile.gettempdir(), "pretty.html")
|
||||||
url = 'file://' + tmp_file
|
url = 'file://' + tmp_file
|
||||||
|
|
Loading…
Add table
Reference in a new issue