From 478fd981b7c0121b755857bd8d6bf7937cf8a86b Mon Sep 17 00:00:00 2001 From: Om Godse Date: Thu, 28 May 2020 21:07:18 +0530 Subject: [PATCH] Fixed bug that occurred when exporting notes containing '/' in the title --- app/src/main/java/com/omgodse/notally/helpers/ExportHelper.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/omgodse/notally/helpers/ExportHelper.kt b/app/src/main/java/com/omgodse/notally/helpers/ExportHelper.kt index 92d3e924..275da527 100644 --- a/app/src/main/java/com/omgodse/notally/helpers/ExportHelper.kt +++ b/app/src/main/java/com/omgodse/notally/helpers/ExportHelper.kt @@ -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 {