Explorar o código

minor fix for the quote problem

Luke Ehresman %!s(int64=25) %!d(string=hai) anos
pai
achega
f667732d6e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      functions/smtp.php

+ 2 - 2
functions/smtp.php

@@ -76,6 +76,7 @@
       $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
       $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
       errorCheck($tmp);
       errorCheck($tmp);
 
 
+      $subject = stripslashes($subject);
       fputs($smtpConnection, "Subject: $subject\n"); // Subject
       fputs($smtpConnection, "Subject: $subject\n"); // Subject
       fputs($smtpConnection, "From: $from\n"); // Subject
       fputs($smtpConnection, "From: $from\n"); // Subject
       fputs($smtpConnection, "To: $to_list\n");    // Who it's TO
       fputs($smtpConnection, "To: $to_list\n");    // Who it's TO
@@ -89,8 +90,7 @@
       if ($reply_to != "")
       if ($reply_to != "")
          fputs($smtpConnection, "Reply-To: $reply_to\n");
          fputs($smtpConnection, "Reply-To: $reply_to\n");
 
 
-      str_replace("\\\"", "\"", $body);
-      str_replace("\\\'", "\'", $body);
+      $body = stripslashes($body);
       fputs($smtpConnection, "$body\n"); // send the body of the message
       fputs($smtpConnection, "$body\n"); // send the body of the message
 
 
       fputs($smtpConnection, ".\n"); // end the DATA part
       fputs($smtpConnection, ".\n"); // end the DATA part