Encode characters to make url validate.