diff --git a/src/Form/EntityEmbedDialog.php b/src/Form/EntityEmbedDialog.php index e8befc93811be7ad117e007d351dab9a4d19421d..aad8c21b00d444a2175d6982e86db2d38c50d2e5 100644 --- a/src/Form/EntityEmbedDialog.php +++ b/src/Form/EntityEmbedDialog.php @@ -537,7 +537,6 @@ class EntityEmbedDialog extends FormBase { '#type' => 'textarea', '#rows' => 3, '#default_value' => isset($entity_element['data-caption']) ? Html::decodeEntities($entity_element['data-caption']) : '', - '#element_validate' => ['::escapeValue'], ]; } @@ -850,18 +849,6 @@ class EntityEmbedDialog extends FormBase { return $response; } - /** - * Form element validation handler; Escapes the value an element. - * - * This should be used for any element in the embed form which may contain - * HTML that should be serialized as an attribute element on the embed. - */ - public static function escapeValue($element, FormStateInterface $form_state) { - if ($value = trim($element['#value'])) { - $form_state->setValueForElement($element, Html::escape($value)); - } - } - /** * Returns the allowed display plugins given an embed button and an entity. *