Skip to main content
2 of 2
edited title
leymannx
  • 18.8k
  • 6
  • 72
  • 126

Empty link creation

Is there a way to create an empty link in D8? What I want specifically is

<a href="javascript:void(0)">Link</a>

Url::fromUserInput('#', ['fragment' => '#']) creates an anchor tag with ## link.

Thanks

Pratip Ghosh
  • 418
  • 1
  • 3
  • 19