Commit 14692ac3 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#172194 by ax: html to text was not picking up href values if not being the last argument

parent 0fd16236
......@@ -276,7 +276,7 @@ function drupal_html_to_text($string, $allowed_tags = NULL) {
// Replace inline <a> tags with the text of link and a footnote.
// 'See <a href="http://drupal.org">the Drupal site</a>' becomes
// 'See the Drupal site [1]' with the URL included as a footnote.
$pattern = '@(<a[^>]+?href="([^"]*)">(.+?)</a>)@i';
$pattern = '@(<a[^>]+?href="([^"]*)"[^>]*?>(.+?)</a>)@i';
$string = preg_replace_callback($pattern, '_drupal_html_to_mail_urls', $string);
$urls = _drupal_html_to_mail_urls();
$footnotes = '';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment