diff --git a/plugins/views_plugin_style.inc b/plugins/views_plugin_style.inc index fe12607..a88bef8 100644 --- a/plugins/views_plugin_style.inc +++ b/plugins/views_plugin_style.inc @@ -139,7 +139,7 @@ class views_plugin_style extends views_plugin { // Convert whatever the result is to a nice clean class name foreach ($classes as &$class) { - $class = drupal_html_class($class); + $class = views_clean_css_identifier($class); } return implode(' ', $classes); } diff --git a/tests/styles/views_plugin_style.test b/tests/styles/views_plugin_style.test index 2bb2857..933d5a6 100644 --- a/tests/styles/views_plugin_style.test +++ b/tests/styles/views_plugin_style.test @@ -252,11 +252,11 @@ class ViewsPluginStyleTestCase extends ViewsPluginStyleTestBase { foreach ($rows as $row) { $attributes = $row->attributes(); $class = (string) $attributes['class'][0]; - $this->assertTrue(strpos($class, $random_name) !== FALSE, 'Take sure that a custom css class is added to the output.'); + $this->assertTrue(strpos($class, $random_name) !== FALSE, 'Make sure that a custom css class is added to the output.'); // Check token replacement. - $name = drupal_html_class($view->field['name']->get_value($view->result[$count])); - $this->assertTrue(strpos($class, "test-token-$name") !== FALSE, 'Take sure that a token in custom css class is replaced.'); + $name = views_clean_css_identifier($view->field['name']->get_value($view->result[$count])); + $this->assertTrue(strpos($class, "test-token-$name") !== FALSE, 'Make sure that a token in custom css class is replaced.'); $count++; }