Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
ChronoSpheris CreditAttribution: ChronoSpheris as a volunteer commentedHi,
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);
...
Comment #3
sumitmadan CreditAttribution: sumitmadan at QED42 commentedHi 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