In theme_html_tag(), make children of the HTML tag when used in a render array into children in the final rendered HTML, so

$render_array = array(
  'a' => array(
    '#type' => 'html_tag',
    '#tag' => 'div',
    'b' => array(
      '#type' => 'html_tag',
      '#tag' => 'div',
      '#value' => 'foo'
    )
  )
);
drupal_render($render_array);

becomes

<div>
  <div>
    foo
  </div>
</div>

Comments

lauriii’s picture

Version: 8.0.x-dev » 8.1.x-dev
Issue summary: View changes

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

WidgetsBurritos’s picture