# File src/rexml/parsers/baseparser.rb, line 345
                        def normalize( input, entities=nil, entity_filter=nil )
                                copy = input.clone
                                # Doing it like this rather than in a loop improves the speed
                                copy.gsub!( EREFERENCE, '&' )
                                entities.each do |key, value|
                                        copy.gsub!( value, "&#{key};" ) unless entity_filter and 
                                                                                                                                                        entity_filter.include?(entity)
                                end if entities
                                copy.gsub!( EREFERENCE, '&' )
                                DEFAULT_ENTITIES.each do |key, value|
                                        copy.gsub!( value[2], value[1] )
                                end
                                copy
                        end