aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-15 16:41:54 -0800
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-16 21:22:34 -0500
commitba5db45e7aba220aa9743d4f3fb4b41d5a698148 (patch)
tree378d202804ab43b1a267ab2c504873e7925aa886
parenta84c3c915d68588e5d21647f7cc7dd22241ec326 (diff)
downloadpatchfoo-ba5db45e7aba220aa9743d4f3fb4b41d5a698148.tar.gz
patchfoo-ba5db45e7aba220aa9743d4f3fb4b41d5a698148.zip
Use \n instead of \r\n in message text
-rw-r--r--lib/serve.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 64f25f0..e1770a3 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -794,6 +794,7 @@ Serve.prototype.composer = function (opts, cb) {
try {
content = JSON.parse(data.text)
} catch (err) {
+ data.text = String(data.text).replace(/\r\n/g, '\n')
content = {
type: 'post',
text: data.text,