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

8 - Empty link creation

Source Link
Pratip Ghosh
  • 418
  • 1
  • 3
  • 19

8 - 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