1

Possible Duplicate:
JavaScript URL encode

some scripts working fine started to give me this error.

It is probably due to some special chars inside the string passed.

Ajax is calling this:

.../ControllerAjaxSpecifiche.php?Material=100%%20poliester&product=Maglia (trikot)

this way it says 403 forbidden error

removing the % and () it works

.../ControllerAjaxSpecifiche.php?Material=100%20poliester&product=Maglia trikot

How I can solve this problem?

I tried passing those variables as post, buit it did not works, and I continue having same problem.

Community
  • 1
  • 1
giuseppe
  • 827
  • 1
  • 9
  • 19

2 Answers2

3

Try urlencode() (php) or encodeURI() encodeURIComponent() (js) before passing the values. This should escape any harmful characters

karka91
  • 733
  • 1
  • 6
  • 20
1

You need to use urlencode to format your links correctly

Ibu
  • 42,752
  • 13
  • 76
  • 103