Fixed infinite loop when escape characters are in the link