Commit 575b07d2 authored by Jeroen Tubex's avatar Jeroen Tubex Committed by Sascha Grossenbacher
Browse files

Issue #3101563 by JeroenT, mizutaniDC: Add a trailing slash to the path...

Issue #3101563 by JeroenT, mizutaniDC: Add a trailing slash to the path element in the redirect source widget
parent e6b6dd34
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -45,7 +45,9 @@ class RedirectSourceWidget extends WidgetBase {
      '#default_value' => $default_url_value,
      '#maxlength' => 2048,
      '#required' => $element['#required'],
      '#field_prefix' => Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(),
      // Add a trailing slash to make it more clear that a redirect should not
      // start with a leading slash.
      '#field_prefix' => \Drupal::request()->getSchemeAndHttpHost() . '/',
      '#attributes' => ['data-disable-refocus' => 'true'],
    ];