Hello, i want ask if we can disable validate URL in Link Module in Drupal 8?
Because i want add in last of URL for example :
"http://www.exemple.com/test#xyz"

But in view Page i see only "http://www.exemple.com/test"

Can you help me pleeze ! Thank you

Comments

m.kharrat created an issue. See original summary.

ChronoSpheris’s picture

Hi,

Here is a temporary fix I've made on my website.

In the file "core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php"
add the following before "$url->setOptions($options);", line 260 :

$url_fragment = $url->getOption('fragment');
if (!empty($url_fragment)) {
$options['fragment'] = $url_fragment;
}

$url->setOptions($options);
...

sumitmadan’s picture

Status: Needs work » Closed (won't fix)

Hi m.kharrat,

Link module is a part of core now. So creating issue in module queue won't help. You better use support forms or drupal core issue queue.

@seoken hacking core is not a good idea, I would say worst idea. :D