Skip to content
Snippets Groups Projects
Commit c082e1b8 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent 21000956
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment