MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

URL encoding "url" parameter in makeRequest()

Last post 03-24-2008 12:10 PM by J9. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-12-2008 12:05 AM

    • Wee
    • Not Ranked
    • Joined on 02-05-2008
    • Posts 10

    URL encoding "url" parameter in makeRequest()

    When I use makeRequest(url, callback, Additional) and I don't precede my URL parameters with a question mark "?" (i.e. when I am using search engine friendly URLs) even if I double-encode a slash "/" it is passed to my server completely unencoded. Since user input may contain a slash, I would like makeRequest() to handle URL encoding in a consistent manner regardless of what the makeRequest url might look like.

    Example parameter: occupation = IT/MIS

    occupation (URL encoded) =  IT%2FMIS

    occupation (Double URL encoded) = IT%252FMIS

     

    Scenario 1:  Using GET Parameters

    makeRequest URL = http://www.mysite.com/?occupation=IT%252FMIS

    actual server request =  http://www.mysite.com/?occupation=IT%2FMIS <--- this is good

     

    Scenario 2: Using Search Engine Friendly Parameters (what I want to do)

    makeRequestURL = http://www.mysite.com/IT%252FMIS

    actual server request =  http://www.mysite.com/IT/MIS <--- slash character unencoded! :-(

     

    For more details, see thread at http://developer.myspace.com/Community/forums/t/667.aspx

  • 03-24-2008 12:10 PM In reply to

    • J9
    • Top 50 Contributor
    • Joined on 02-13-2008
    • Posts 89
    • MDP Team

    Re: URL encoding "url" parameter in makeRequest()

    Thanks; I've reported this issue.

Page 1 of 1 (2 items)