Commit e58d14be authored by alexpott's avatar alexpott

Issue #2424927 by Wim Leers: Docs typo in LinkWidget

parent 3ad86b60
......@@ -148,8 +148,8 @@ public static function validateUriElement($element, FormStateInterface $form_sta
$uri = static::getUserEnteredStringAsUri($element['#value']);
$form_state->setValueForElement($element, $uri);
// If getUserEnteredStringAsUri() mapped the entered value is mapped to a
// 'user-path:' URI , ensure the raw value begins with '/', '?' or '#'.
// If getUserEnteredStringAsUri() mapped the entered value to a 'user-path:'
// URI , ensure the raw value begins with '/', '?' or '#'.
// @todo '<front>' is valid input for BC reasons, may be removed by
// https://www.drupal.org/node/2421941
if (parse_url($uri, PHP_URL_SCHEME) === 'user-path' && !in_array($element['#value'][0], ['/', '?', '#'], TRUE) && substr($element['#value'], 0, 7) !== '<front>') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment