Smart url encodes characters without already urlencoded strings. You can also set allowed_chars in argument where default are "-_.~".