By ianthomas_uk on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
Drupal 7
drupal_html_class($foo)
drupal_html_id($foo)
drupal_clean_css_identifier($foo)
Drupal 8
use Drupal\Component\Utility\Html;
Html::getClass($foo);
Html::getId($foo);
Html::cleanCssIdentifier($foo);
Impacts:
Module developers
Comments
Html::getUniqueId()
Correction: D7's
drupal_html_id()is equivalent to D8'sHtml::getUniqueId()method. TheHtml::getId()does not guarantee uniqueness of resulting ID.