# File lib/rexml/text.rb, line 393def Text::unnormalize(string,doctype=nil,filter=nil,illegal=nil)sum=0string.gsub(/\r\n?/,"\n").gsub(REFERENCE){s=Text.expand($&,doctype,filter)ifsum+s.bytesize>Security.entity_expansion_text_limitraise"entity expansion has grown too large"elsesum+=s.bytesizeends}end