3

I tried out "whateverorigin.org" for overcoming the cross-domain policy. It works fine, except if the URL of the other page contains parameters and a question mark.

var url = 'http://www.example.com/something?parameter=test';
$.getJSON('http://whateverorigin.org/get?url=' + encodeURIComponent(url) + '&callback=?', function(data){
    var html = ""+data.contents;
    $("#output").html(html);
});

The question mark doesn't get recognized, so the page is not being found. Is there any solution for this issue?

xampper
  • 91
  • 7
  • Only one question mark is allowed to set the first trialing parameter (which is already used in `http://whateverorigin.org/get?url=`), subsequent parameters should be chained by `&` so you may need to convert the question mark in your URL into an ampersand using `.replace()` – JFK Aug 14 '14 at 23:28
  • I have the same problem, I get 404 when there is a `?` (replacing by & is not working) – stallingOne May 02 '16 at 16:38

0 Answers0