简体   繁体   中英

Crossrider IE encoding with JSONP

working in extension that appears popup when user double click in any word in the page

it's working fine in FF and GC but it appears character encoding problem in IE

IE编码与Firefox编码

i'm using JSONP

function PopupGenerate(e,selectedText){
  PopUpMessage(selectedText,waitMessage);
  appAPI.request.get({
  url: WebServiceUrl + encodeURIComponent(selectedText),      
  onSuccess: function(responseString) {
    var response = JSON.parse(responseString);
    if(response.SearchResults == "NoResult")
        {           
             PopUpMessage(selectedText,noResultMessage);
        }
        else
        {   
            PopUpWord(selectedText,response,e);
        }
  },
  onFailure: function(httpCode) {
  PopUpMessage(selectedText,ConnectionErrorMessage);
  },
contentType: 'application/json'
});    
}

so how to fix it in IE?

This is a known issue with encoded strings in Internet Explorer. You can workaround the issue by sending the text using HTML special characters that you can encode using one of the online encoders:

[ Disclosure : I am a Crossrider employee]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM