Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion modules/javascript/src/main/webapp/javascript/atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -3085,7 +3085,16 @@

// encodeURI and decodeURI are needed to normalize URL between IE and non-IE,
// since IE doesn't encode the href property value and return it - http://jsfiddle.net/Yq9M8/1/
return encodeURI(decodeURI(div.firstChild.href));
var ua = window.navigator.userAgent;
if(ua.indexOf('MSIE ')>0 || ua.indexOf('Trident/') > 0 || ua.indexOf('Edge/') > 0){
return atmosphere.util.fixedEncodeURI(decodeURI(div.firstChild.href));
}
return div.firstChild.href;
},

// Fix IPv6 escaping, see https://github.com/Atmosphere/atmosphere-javascript/pull/243
fixedEncodeURI: function (str) {
return encodeURI(str).replace(/%5B/g, '[').replace(/%5D/g, ']');
},

prepareURL: function (url) {
Expand Down