function drupal_html_class

Prepares 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.

17 calls to drupal_html_class()

File

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

Code

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