tinymce.html.js
function buildEntitiesLookup(items, radix) {
            var i, chr, entity, lookup = {};
            if (items) {
                items = items.split(',');
                radix = radix || 10;
                // Build entities lookup table
                for (i = 0; i < items.length; i += 2) {
                    chr = String.fromCharCode(parseInt(items[i], radix));
                    // Only add non base entities
                    if (!baseEntities[chr]) {
                        entity = '&' + items[i + 1] + ';';
                        lookup[chr] = entity;
                        lookup[entity] = chr;
                    }
                }
                return lookup;
            }
        }
function buildEntitiesLookup(items, radix) {
            var i, chr, entity, lookup = {};
            if (items) {
                items = items.split(',');
                radix = radix || 10;
                // Build entities lookup table
                for (i = 0; i < items.length; i += 2) {
                    chr = String.fromCharCode(parseInt(items[i], radix));
                    // Only add non base entities
                    if (!baseEntities[chr]) {
                        entity = '&' + items[i + 1] + ';';
                        lookup[chr] = entity;
                        lookup[entity] = chr;
                    }
                }
                return lookup;
            }
        }
function buildEntitiesLookup ( items , radix ) { var i , chr , entity , lookup = { } ; if ( items ) { items = items . split ( ',' ) ; radix = radix || 10 ; // Build entities lookup table for ( i = 0 ; i < items . length ; i += 2 ) { chr = String . fromCharCode ( parseInt ( items [ i ] , radix ) ) ; // Only add non base entities if ( ! baseEntities [ chr ] ) { entity = '&' + items [ i + 1 ] + ';' ; lookup [ chr ] = entity ; lookup [ entity ] = chr ; } } return lookup ; } }
Build a two way lookup table for the entities
Build a two way lookup table for the entities