--- a/branches/2.5.4/cgi-bin/yabb2/Sources/InstantMessage.pm
+++ b/branches/2.5.4/cgi-bin/yabb2/Sources/InstantMessage.pm
@@ -1,6 +1,6 @@
 ###############################################################################
 # InstantMessage.pm                                                           #
-# $Date: 2013-06-25 15:33:13 +0000 (Tue, 25 Jun 2013) $
+# $Date: 2013-07-12 15:49:28 +0000 (Fri, 12 Jul 2013) $
 ###############################################################################
 # YaBB: Yet another Bulletin Board                                            #
 # Open-Source Community Software for Webmasters                               #
@@ -18,7 +18,7 @@
 use CGI::Carp qw(fatalsToBrowser);
 our $VERSION = '2.5.4';
 
-$instantmessagepmver = 'YaBB 2.5.4 $Revision: 1081 $';
+$instantmessagepmver = 'YaBB 2.5.4 $Revision: 1088 $';
 if ( $action eq 'detailedversion' ) { return 1; }
 require Sources::PostBox;
 require Sources::SpamCheck;
@@ -153,7 +153,7 @@
         if ( !$sendBMess ) { LoadUser( $INFO{'to'} ); }
     }
 
-    $message =~ s/<br.*?>/\n/gism;
+    $message =~ s/<br.*?>/\n/igsm;
     $message =~ s/&nbsp;/ /gsm;
     ToChars($message);
     $message = Censor($message);
@@ -968,7 +968,7 @@
     $subject =~ s/^\s+|\s+$//gsm;
 
     $message = $FORM{'message'};
-    $message =~ s/^\s+|\s+$//gsm;
+    $message =~ s/^\s+|\s+$//g;
 
     # no subject/no message are bad!
     if ( !$subject ) { $error = $error_txt{'no_subject'}; }