Fixed breakage when the link href contains a query string.