Replace newline with html breaks. Encode input to preserv utf-8.