diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php
index 2f41ab5..6a6e27e 100644
--- a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php
+++ b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php
@@ -88,7 +88,7 @@ public function form(array $form, array &$form_state) {
       '#field_prefix' => $this->entity->isNew() ? $this->entity->getTargetType() . '.' : '',
       '#machine_name' => array(
         'exists' => array($this, 'exists'),
-        'replace_pattern' => '[^a-z0-9_.]+',
+        'replace_pattern' => '[^a-z0-9_]+',
       ),
     );
 
