Mercurial > defr > drupal > core
comparison includes/mail.inc @ 7:fff6d4c8c043 6.3
Drupal 6.3
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:30:28 +0100 |
parents | 2427550111ae |
children | 589fb7c02327 |
comparison
equal
deleted
inserted
replaced
6:2cfdc3c92142 | 7:fff6d4c8c043 |
---|---|
1 <?php | 1 <?php |
2 // $Id: mail.inc,v 1.8.2.2 2008/04/02 08:41:30 goba Exp $ | 2 // $Id: mail.inc,v 1.8.2.3 2008/05/19 08:19:00 goba Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * Compose and optionally send an e-mail message. | 5 * Compose and optionally send an e-mail message. |
6 * | 6 * |
7 * Sending an e-mail works with defining an e-mail template (subject, text | 7 * Sending an e-mail works with defining an e-mail template (subject, text |
270 | 270 |
271 // Make sure tags, entities and attributes are well-formed and properly nested. | 271 // Make sure tags, entities and attributes are well-formed and properly nested. |
272 $string = _filter_htmlcorrector(filter_xss($string, $allowed_tags)); | 272 $string = _filter_htmlcorrector(filter_xss($string, $allowed_tags)); |
273 | 273 |
274 // Apply inline styles. | 274 // Apply inline styles. |
275 $string = preg_replace('!</?(em|i)>!i', '/', $string); | 275 $string = preg_replace('!</?(em|i)((?> +)[^>]*)?>!i', '/', $string); |
276 $string = preg_replace('!</?(strong|b)>!i', '*', $string); | 276 $string = preg_replace('!</?(strong|b)((?> +)[^>]*)?>!i', '*', $string); |
277 | 277 |
278 // Replace inline <a> tags with the text of link and a footnote. | 278 // Replace inline <a> tags with the text of link and a footnote. |
279 // 'See <a href="http://drupal.org">the Drupal site</a>' becomes | 279 // 'See <a href="http://drupal.org">the Drupal site</a>' becomes |
280 // 'See the Drupal site [1]' with the URL included as a footnote. | 280 // 'See the Drupal site [1]' with the URL included as a footnote. |
281 _drupal_html_to_mail_urls(NULL, TRUE); | 281 _drupal_html_to_mail_urls(NULL, TRUE); |