1 filter.pages.inc filter_format_editor_link_form_validate($form, &$form_state)

Validate handler for filter_format_editor_link_form().

File

core/modules/filter/filter.pages.inc, line 389
User page callbacks for the Filter module.

Code

function filter_format_editor_link_form_validate($form, &$form_state) {
  if (isset($form_state['values']['attributes']['class'])) {
    $classes = explode(' ', $form_state['values']['attributes']['class']);
    $clean_classes = array();
    foreach ($classes as $class_name) {
      $clean_classes[] = backdrop_clean_css_identifier($class_name, array());
    }
    $form_state['values']['attributes']['class'] = implode(' ', $clean_classes);
  }
}