Fixed path handling of internal links

* Bug fix: Fixed path handling of internal links
  [ghicaale refs #16666]