parsing link targets properly