summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/mail.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/mail.inc b/includes/mail.inc
index c2394a414..a7db9a287 100644
--- a/includes/mail.inc
+++ b/includes/mail.inc
@@ -272,8 +272,8 @@ function drupal_html_to_text($string, $allowed_tags = NULL) {
$string = _filter_htmlcorrector(filter_xss($string, $allowed_tags));
// Apply inline styles.
- $string = preg_replace('!</?(em|i)>!i', '/', $string);
- $string = preg_replace('!</?(strong|b)>!i', '*', $string);
+ $string = preg_replace('!</?(em|i)((?> +)[^>]*)?>!i', '/', $string);
+ $string = preg_replace('!</?(strong|b)((?> +)[^>]*)?>!i', '*', $string);
// Replace inline <a> tags with the text of link and a footnote.
// 'See <a href="http://drupal.org">the Drupal site</a>' becomes