Updated _encodeHTMLEntities to use htmlentities as found at http://phpjs.org/functions/htmlentities/ so that more character encoding is supported. The jquery solution was far too incomplete to be useful in a text editor.