

var coreEscape = window.escape;

window.escape = function ( str ) {

  var chars = [];
  for (var i = 0x410; i <= 0x44F; i++) { chars[i] = i - 0x350; }
  chars[0x401] = 0xA8;
  chars[0x451] = 0xB8;
  var res = [];
  
  str = new String(str); // for mozilla 
  
  for (var i = 0; i < str.length; i++)  {
    var ch = str.charCodeAt(i);
    if (typeof chars[ch] != 'undefined') { ch = chars[ch]; }
    if (ch <= 0xFF) { res.push(ch); }
  }
  return coreEscape( String.fromCharCode.apply(null, res) );
}

