[TASK] Improve link parsing function

Releases: 1.1
Change-Id: Ib896ad20bea4ee9f287c719266b7631009eb2a14
Reviewed-on: https://review.typo3.org/25375
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes