fix parsing of text links