diff --git a/plugins/exporter.koplugin/note.tpl b/plugins/exporter.koplugin/note.tpl
index 357e45199..6b2975c0c 100644
--- a/plugins/exporter.koplugin/note.tpl
+++ b/plugins/exporter.koplugin/note.tpl
@@ -44,8 +44,12 @@
local esc, _ = text:gsub('&', '&'):gsub('<', '<'):gsub('>', '>')
return esc
end
+ function newline_to_br(text)
+ return text:gsub("\n", "
")
+ end
}#
+
#{= htmlescape(booknotes.title) }#
#{= htmlescape(booknotes.author) }#
@@ -60,7 +64,7 @@
#{= os.date("%x", clipping.time) }##{ if clipping.chapter then }##{= clipping.chapter }#: #{ end }# #{= clipping.page }#
-
#{= htmlescape(clipping.text) }#
+
#{= newline_to_br(htmlescape(clipping.text)) }#
#{ if clipping.image then }#
#{ end }#
@@ -68,7 +72,7 @@
#{ if clipping.note then }#
#{= htmlescape(notemarks) }#
- #{= htmlescape(clipping.note) }#
+ #{= newline_to_br(htmlescape(clipping.note)) }#
#{ end }#