Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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'],
];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment