Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
markup
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
5 Jan 2014 at 00:15 UTC
Updated:
29 Jul 2014 at 23:15 UTC
Jump to comment: Most recent
Updated: Comment #0
File common.inc has three legacy global functions which handle validating or "cleaning" of HTML identifiers. These are drupal_clean_css_identifier, drupal_html_class and drupal_html_id. Global legacy functions are bad.
Create a service html.identifier with methods validate and validateUnique.
TODO
None.
Comments
Comment #1
jiv_e commentedComment #2
jiv_e commentedThis issue was introduced to me by dawehner. This is my first real contribution to Drupal 8 code so bare with me. I also try to practise test driven development as I go.
Comment #3
jiv_e commentedComment #4
dawehnerThanks for working on that.
Comment #5
larowlanPretty sure there is already an open issue for this
Comment #6
jiv_e commentedI couldn't find one. Please, let me know if you find it!
Comment #7
larowlan#2121713: Move drupal_html_id() and drupal_html_class() to Drupal\Component\Utility
Comment #8
larowlanAnd #2082103: Convert drupal_clean_css_identifier() to a component which was merged into #2121713: Move drupal_html_id() and drupal_html_class() to Drupal\Component\Utility
Comment #9
jiv_e commentedThanks! Broken issue search was a limiting factor. I found this also with Google.
Comment #10
jiv_e commented