Skip to content
Snippets Groups Projects
Commit 7d0086d1 authored by deuce's avatar deuce
Browse files

Fix up word_wrap usage... especially in reply.ssjs.

parent cd41ec3a
No related branches found
No related tags found
No related merge requests found
...@@ -112,7 +112,7 @@ if(msg.type=="plain") { ...@@ -112,7 +112,7 @@ if(msg.type=="plain") {
} }
/* Plain text */ /* Plain text */
else { else {
template.body=word_wrap(template.body,80); template.body=word_wrap(template.body);
template.body=html_encode(template.body,true,false,false,false); template.body=html_encode(template.body,true,false,false,false);
} }
} }
......
...@@ -49,7 +49,7 @@ if(msg.type=="plain") { ...@@ -49,7 +49,7 @@ if(msg.type=="plain") {
} }
/* Plain text */ /* Plain text */
else { else {
template.body=word_wrap(template.body,80); template.body=word_wrap(template.body);
template.body=html_encode(template.body,true,false,false,false); template.body=html_encode(template.body,true,false,false,false);
} }
if(template.hdr != null) { if(template.hdr != null) {
......
...@@ -60,7 +60,9 @@ template.number=hdr.number; ...@@ -60,7 +60,9 @@ template.number=hdr.number;
template.body=msgbase.get_msg_body(false,parseInt(http_request.query.reply_to),true); template.body=msgbase.get_msg_body(false,parseInt(http_request.query.reply_to),true);
if(this.word_wrap != undefined) { if(this.word_wrap != undefined) {
template.body=quote_msg(word_wrap(template.body,79),79); // quote_msg adds three chars to each line. Re-wrap to 76 chars...
// with the extra three, we're still under 80 *.
template.body=quote_msg(word_wrap(template.body,76),79);
} }
else { else {
template.body=template.body.replace(/^(.)/mg,"> $1"); template.body=template.body.replace(/^(.)/mg,"> $1");
......
...@@ -38,7 +38,7 @@ else { ...@@ -38,7 +38,7 @@ else {
var body=http_request.query.body[0]; var body=http_request.query.body[0];
body=body.replace(/([^\r])\n/g,"$1\r\n"); body=body.replace(/([^\r])\n/g,"$1\r\n");
body=word_wrap(body, 80); body=word_wrap(body);
hdrs.from=user.alias; hdrs.from=user.alias;
hdrs.from_ext=user.number; hdrs.from_ext=user.number;
......
...@@ -84,7 +84,7 @@ if(http_request.query["item"]) { ...@@ -84,7 +84,7 @@ if(http_request.query["item"]) {
} }
/* Plain text */ /* Plain text */
else { else {
template.body=word_wrap(template.body,80); template.body=word_wrap(template.body);
template.body=html_encode(template.body,true,false,false,false); template.body=html_encode(template.body,true,false,false,false);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment