2

The question is pretty self explanatory. I basically use '/' in a value on the query string of my URL, and angular (or the browser?) encodes it as '%2F'. Normally I wouldn't fight this, but I've read that '/' isn't fully restricted for use on the query string portion, and since this URL will be shared, it would be a lot prettier with '/' in place of '%2f'. Do you of any way to achieve this? Im using UI-router and the URL's are thus being formatted interally (i.e. I'm not setting $location.url()).

Edit: I can show you some code but there's nothing really descriptive on my end. Lets say I have
var queryVal = some/place/tobe;
And a state defined using ui-router with a url such as
url: /:foo/bar?q
Then I'm calling
$state.go('state', params); Where params is an object with the proper parameters, including the unencoded queryVal. The problem is that somewhere down the line angular or the browser is automatically turning
some/place/tobe into
some%2Fplace%2Ftobe And that encoded version is what shows up in the address bar.

Derek
  • 722
  • 1
  • 6
  • 16

0 Answers0