rem: const entityVersion = Components.interfaces.nsIEntityConverter.html40 | Components.interfaces.nsIEntityConverter.mathml20; 
add: const entityVersion = Components.interfaces.nsIEntityConverter.entityW3C; 
context: function unicodeTOentity(text){  const charTable = {    '&': '&amp;<span class="entity">amp;</span>',    '<': '&amp;<span class="entity">lt;</span>',    '>': '&amp;<span class="entity">gt;</span>',    '"': '&amp;<span class="entity">quot;</span>'  };  function charTableLookup(letter) {    return charTable[letter];  }  function convertEntity(letter) {    try {      var unichar = gEntityConverter.ConvertToEntity(letter, entityVersion);      var entity = unichar.substring(1); // extract '&'      return '&amp;<span class="entity">' + entity + '</span>';    } catch (ex) {      return letter;    }  }  if (!gEntityConverter) {    try {      gEntityConverter =        Components.classes["@mozilla.org/intl/entityconverter;1"]                  .createInstance(Components.interfaces.nsIEntityConverter);    } catch(e) { }  }  const entityVersion =    Components.interfaces.nsIEntityConverter.html40 |    Components.interfaces.nsIEntityConverter.mathml20;  var str = text;  // replace chars in our charTable  str = str.replace(/[<>&"]/g, charTableLookup);  // replace chars > 0x7f via nsIEntityConverter  str = str.replace(/[^\0-\u007f]/g, convertEntity);  return str;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/6262c680fadaac922e20133132db95a61a0fd8e3/viewPartialSource.js/buggy/suite/browser/viewPartialSource.js