Issue by InternetDevels: Replace theme() with drupal_render() in filter module.

8.0.x
Alex Pott 2013-06-17 02:01:55 +02:00
parent a544e13f51
commit b61918f0ff
2 changed files with 22 additions and 4 deletions
core/modules/filter
lib/Drupal/filter/Plugin/Filter

View File

@ -1022,7 +1022,11 @@ function theme_filter_guidelines($variables) {
$attributes['class'][] = 'filter-guidelines-' . $format->format;
$output = '<div' . new Attribute($attributes) . '>';
$output .= '<h4 class="label">' . check_plain($format->name) . '</h4>';
$output .= theme('filter_tips', array('tips' => _filter_tips($format->format, FALSE)));
$filter_tips = array(
'#theme' => 'filter_tips',
'#tips' => _filter_tips($format->format, FALSE),
);
$output .= drupal_render($filter_tips);
$output .= '</div>';
return $output;
}
@ -1404,7 +1408,11 @@ function _filter_html_image_secure_process($text) {
}
}
// Replace an invalid image with an error indicator.
theme('filter_html_image_secure_image', array('image' => $image));
$filter_html_image_secure_image = array(
'#theme' => 'filter_html_image_secure_image',
'#image' => $image,
);
drupal_render($filter_html_image_secure_image);
}
$text = filter_dom_serialize($html_dom);
return $text;

View File

@ -134,7 +134,12 @@ class FilterHtml extends FilterBase {
);
}
}
$output .= theme('table', array('header' => $header, 'rows' => $rows));
$table = array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $rows,
);
$output .= drupal_render($table);
$output .= '<p>' . t('Most unusual characters can be directly entered without any problems.') . '</p>';
$output .= '<p>' . t('If you do encounter problems, try using HTML character entities. A common example looks like &amp;amp; for an ampersand &amp; character. For a full list of entities see HTML\'s <a href="@html-entities">entities</a> page. Some of the available characters include:', array('@html-entities' => 'http://www.w3.org/TR/html4/sgml/entities.html')) . '</p>';
@ -154,7 +159,12 @@ class FilterHtml extends FilterBase {
array('data' => $entity[1], 'class' => array('get'))
);
}
$output .= theme('table', array('header' => $header, 'rows' => $rows));
$table = array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $rows,
);
$output .= drupal_render($table);
return $output;
}