Commit c082e1b8 authored by Dries's avatar Dries
Browse files

- Patch #258192 by dww: drupal_html_to_text() doesn't support <strong class='foo'>.

parent 21000956
......@@ -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
......
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