Skip to content

Commit

Permalink
added return_to_nl() to fix carraige return inserted by real_escape_s…
Browse files Browse the repository at this point in the history
…tring
  • Loading branch information
gregrgay committed May 2, 2016
1 parent 7bd58ab commit 875e36e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions inbox/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
$msg .= _AT('to') .': ' . $my_display_name . "\r\n";
$msg .= _AT('subject').': ' . $row['subject'] . "\r\n";
$msg .= _AT('date') .': ' . $row['date_sent'] . "\r\n";
$msg .= _AT('body') .': ' . $row['body'] . "\r\n";
$msg .= _AT('body') .': ' . returns_to_nl($row['body']) . "\r\n";
$msg .= "\r\n=============================================\r\n\r\n";

$inbox_messages .= $msg;
Expand All @@ -55,7 +55,7 @@
$msg .= _AT('to') .': ' . get_display_name($row['from_member_id']). "\r\n";
$msg .= _AT('subject').': ' . $row['subject'] . "\r\n";
$msg .= _AT('date') .': ' . $row['date_sent'] . "\r\n";
$msg .= _AT('body') .': ' . $row['body'] . "\r\n";
$msg .= _AT('body') .': ' . returns_to_nl($row['body']) . "\r\n";
$msg .= "\r\n=============================================\r\n\r\n";

$sent_messages .= $msg;
Expand Down
4 changes: 2 additions & 2 deletions inbox/send_message.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@
$body .= ' ...';
}
$body = "\n\n\n"._AT('in_reply_to').":\n".$body;
echo $body;
echo returns_to_nl($body);
} else {
echo htmlspecialchars($_POST['message'], ENT_QUOTES);
echo htmlspecialchars(returns_to_nl($_POST['message']), ENT_QUOTES);
}
?></textarea>
</div>
Expand Down
2 changes: 1 addition & 1 deletion themes/default/inbox/inbox.tmpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>

<div class="body">
<p><?php echo AT_print($this->row_messages['body'], 'messages.body'); ?></p>
<p><?php echo AT_print(returns_to_nl($this->row_messages['body']), 'messages.body'); ?></p>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion themes/default/inbox/sent_messages.tmpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</div>

<div class="body">
<p><?php echo AT_print($this->row_messages['body'], 'messages.body'); ?></p>
<p><?php echo AT_print(returns_to_nl($this->row_messages['body']), 'messages.body'); ?></p>
</div>
<div style="clear: both; font-size:0.1em"></div>
</div>
Expand Down

0 comments on commit 875e36e

Please sign in to comment.