Skip navigation
Help

drupal_html_class

7 common.inc drupal_html_class($class)

Prepare a string for use as a valid class name.

Do not pass one string containing multiple classes as they will be incorrectly concatenated with dashes, i.e. "one two" will become "one-two".

Parameters

$class: The class name to clean.

Return value

The cleaned class name.

12 calls to drupal_html_class()

File

drupal/includes/common.inc, line 3669
Common functions that many Drupal modules will need to reference.

Code

function drupal_html_class($class) {
  return drupal_clean_css_identifier(drupal_strtolower($class));
}