diff --git a/core/lib/Drupal/Core/Render/Element/FormElement.php b/core/lib/Drupal/Core/Render/Element/FormElement.php index b2d9b90..173a55c 100644 --- a/core/lib/Drupal/Core/Render/Element/FormElement.php +++ b/core/lib/Drupal/Core/Render/Element/FormElement.php @@ -130,9 +130,7 @@ public static function processAutocomplete(&$element, FormStateInterface $form_s $element['#attributes']['class'][] = 'form-autocomplete'; $metadata->addAttachments(['library' => ['core/drupal.autocomplete']]); // Provide a data attribute for the JavaScript behavior to bind to. - // Prefix the uri with the script name to bypass relative urls - forcing - // non-clean urls. e.g. index.php/some/path. - $element['#attributes']['data-autocomplete-path'] = \Drupal::request()->getScriptName() . '/' . $url->getGeneratedUrl(); + $element['#attributes']['data-autocomplete-path'] = $url->getGeneratedUrl(); $metadata = $metadata->merge($url); } $metadata