Commit 0a788a2e authored by webchick's avatar webchick

Issue #2009018 follow-up by StephaneQ: One more replace theme() with...

Issue #2009018 follow-up by StephaneQ: One more replace theme() with drupal_render() in filter module.
parent 6bec9b2f
...@@ -70,12 +70,14 @@ public function process($text, $langcode, $cache, $cache_id) { ...@@ -70,12 +70,14 @@ public function process($text, $langcode, $cache, $cache_id) {
// Given the updated node, caption and alignment: re-render it with a // Given the updated node, caption and alignment: re-render it with a
// caption. // caption.
$altered_html = theme('filter_caption', array( $filter_caption = array(
'node' => $node->C14N(), '#theme' => 'filter_caption',
'tag' => $node->tagName, '#node' => $node->C14N(),
'caption' => $caption, '#tag' => $node->tagName,
'align' => $align, '#caption' => $caption,
)); '#align' => $align,
);
$altered_html = drupal_render($filter_caption);
// Load the altered HTML into a new DOMDocument and retrieve the element. // Load the altered HTML into a new DOMDocument and retrieve the element.
$updated_node = filter_dom_load($altered_html)->getElementsByTagName('body') $updated_node = filter_dom_load($altered_html)->getElementsByTagName('body')
......
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