# File lib/rexml/parsers/baseparser.rb, line 459def normalize(input,entities=nil,entity_filter=nil)copy=input.clone# Doing it like this rather than in a loop improves the speedcopy.gsub!(EREFERENCE,'&')entities.eachdo|key,value|copy.gsub!(value,"&#{key};")unlessentity_filterandentity_filter.include?(entity)endifentitiescopy.gsub!(EREFERENCE,'&')DEFAULT_ENTITIES.eachdo|key,value|copy.gsub!(value[3],value[1])endcopyend