Fix parsing URIs with newlines in the string