Skip to content

Commit

Permalink
Fixed bug that occurred when exporting notes containing '/' in the title
Browse files Browse the repository at this point in the history
  • Loading branch information
OmGodse committed May 28, 2020
1 parent 45a0864 commit 478fd98
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,14 @@ class ExportHelper(private val context: Context, private val fragment: Fragment)
stringWriter.toString()
}

return if (xmlReader.getTitle().isEmpty()) {
val fileName = if (xmlReader.getTitle().isEmpty()) {
val words = body.split(" ")
if (words.size > 1) {
"${words[0]} ${words[1]}"
} else words[0]
} else xmlReader.getTitle()

return fileName.replace("/", "")
}

private fun getHTML(file: File): JsoupDocument {
Expand Down

0 comments on commit 478fd98

Please sign in to comment.