You are here

function form_clean_id in Drupal 4

Same name and namespace in other branches
  1. 5 includes/form.inc \form_clean_id()
  2. 6 includes/form.inc \form_clean_id()

Remove invalid characters from an HTML ID attribute string.

Parameters

$id: The ID to clean

Return value

The cleaned ID

Related topics

2 calls to form_clean_id()
theme_file in includes/form.inc
Format a file upload field.
theme_form_element in includes/theme.inc
Return a themed form element.

File

includes/form.inc, line 1190

Code

function form_clean_id($id = NULL) {
  $id = str_replace('][', '-', $id);
  return $id;
}