I let user to enter text into UITextView then I send it to firebase using this code
func sendDataToFirebase(){
let productID = self.ref.childByAutoId().key
let userID = Auth.auth().currentUser?.uid
let product = [ "productID" : productID,
"uid" : userID,
"details": self.txtProductDetails.text! as String
] as [String : Any]
self.ref.child("products").child(productID!).setValue(product)
}
If the text that user enter has multiline, it will go to firebase and has \n\n
So when I fetch the text I am getting the same result of \n\n. How can I remove \n\n where the textView have to look organized.