简体   繁体   English

使用JSONP的Crossrider IE编码

[英]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 它在FF和GC中工作正常,但在IE中出现了字符编码问题

IE编码与Firefox编码

i'm using JSONP 我正在使用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? 那么如何在IE中修复它?

This is a known issue with encoded strings in Internet Explorer. 这是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: 您可以通过使用可以使用在线编码器之一进行编码的HTML特殊字符发送文本来解决此问题:

[ Disclosure : I am a Crossrider employee] [ 披露 :我是Crossrider员工]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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