Commit a0b26339 authored by catch's avatar catch
Browse files

Issue #2407397 by JeroenT, mrjmd: remove drupal_html_id()

parent 74128e44
......@@ -602,40 +602,6 @@ function drupal_clear_css_cache() {
* Prepares a string for use as a valid HTML ID and guarantees uniqueness.
* This function ensures that each passed HTML ID value only exists once on the
* page. By tracking the already returned ids, this function enables forms,
* blocks, and other content to be output multiple times on the same page,
* without breaking (X)HTML validation.
* For already existing IDs, a counter is appended to the ID string. Therefore,
* JavaScript and CSS code should not rely on any value that was generated by
* this function and instead should rely on manually added CSS classes or
* similarly reliable constructs.
* Two consecutive hyphens separate the counter from the original ID. To manage
* uniqueness across multiple Ajax requests on the same page, Ajax requests
* POST an array of all IDs currently present on the page, which are used to
* prime this function's cache upon first invocation.
* To allow reverse-parsing of IDs submitted via Ajax, any multiple consecutive
* hyphens in the originally passed $id are replaced with a single hyphen.
* @param $id
* The ID to clean.
* @return
* The cleaned ID.
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.0.
* Use \Drupal\Component\Utility\Html::getUniqueId()
function drupal_html_id($id) {
return Html::getUniqueId($id);
* Constructs an array of the defaults that are used for JavaScript assets.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment