Skip to content

Commit

Permalink
Improved email signature removal.
Browse files Browse the repository at this point in the history
Forgot to trim whitespace when checking for the last line created by
email clients. (See commit f492856.)

See #6.
  • Loading branch information
r-a-y committed Dec 5, 2014
1 parent 37910d7 commit ffcb775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/bp-rbe-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ function bp_rbe_remove_email_client_signature( $content ) {
// This is the last check because it's slightly more intensive than the others
else {
// split email into an array of lines; reverse the order
$lines = array_reverse( preg_split( '/$\R?^/m', $content ) );
$lines = array_reverse( preg_split( '/$\R?^/m', trim( $content ) ) );

//print_r($lines);

Expand Down Expand Up @@ -911,7 +911,7 @@ function bp_rbe_remove_email_client_signature( $content ) {
}
}

return $content;
return trim( $content );
}

/**
Expand Down

0 comments on commit ffcb775

Please sign in to comment.