Ajax converts url

Asked

Viewed 38 times

0

Guys I have a routine that sends a query via AJAX to my PHP, so when I have for example the following query: ? value<=1000 ai it converts to ? value%253C=1000. The Request URL looks like this:

http://localhost/api/produtos?search=6&valor%253C=1000&per_page=10&page=1

There is something I can do to make AJAX not convert these characters?

Thank you

  • 1

    there’s no way, you’ll have to do the html decode in the php

  • Instead of using GET use POST, ai doesn’t even appear in the url

  • Using symbols would not be the best way to use querystring .... use practical names for your variables.

  • Thanks @Tobymosque gave it right using urldecode. Thank you.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.