encode function url characters fix