Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you create a field with name containing single quote (I'am...) it will create invalid classes and ids for that field: edit-field-over-18-value-I'm-over-18-years-old-wrapper
making it impossible to theme that field.
A valid class/id name must start with an underscore (_), a dash (-), or a letter(a–z), followed immediately by a letter or underscore, and then any number of dashes, underscores, letters, or numbers:
-?[_a-zA-Z]+[_a-zA-Z0-9-]*