Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
9682507e
Commit
9682507e
authored
Dec 22, 2014
by
webchick
Browse files
Issue
#2382799
by rpayanm: Remove drupal_html_class() and drupal_clean_css_identifier()
parent
7babe4c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/includes/common.inc
View file @
9682507e
...
...
@@ -1171,46 +1171,6 @@ function drupal_clear_css_cache() {
\
Drupal
::
service
(
'asset.css.collection_optimizer'
)
->
deleteAll
();
}
/**
* Prepares a string for use as a CSS identifier (element, class, or ID name).
*
* http://www.w3.org/TR/CSS21/syndata.html#characters shows the syntax for valid
* CSS identifiers (including element names, classes, and IDs in selectors.)
*
* @param $identifier
* The identifier to clean.
* @param $filter
* An array of string replacements to use on the identifier.
*
* @return
* The cleaned identifier.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.0.
* Use \Drupal\Component\Utility\Html::cleanCssIdentifier()
*/
function
drupal_clean_css_identifier
(
$identifier
,
$filter
=
array
(
' '
=>
'-'
,
'_'
=>
'-'
,
'__'
=>
'__'
,
'/'
=>
'-'
,
'['
=>
'-'
,
']'
=>
''
))
{
return
Html
::
cleanCssIdentifier
(
$identifier
,
$filter
);
}
/**
* 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".
*
* @param $class
* The class name to clean.
*
* @return
* The cleaned class name.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.0.
* Use \Drupal\Component\Utility\Html::getClass()
*/
function
drupal_html_class
(
$class
)
{
return
Html
::
getClass
(
$class
);
}
/**
* Prepares a string for use as a valid HTML ID and guarantees uniqueness.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment