class RSpecJUnitFormatter
def escape(text)
def escape(text) # Make sure it's utf-8 (this will throw errors for bad output, but that # seems okay) and replace invalid xml characters with entities text.to_s.encode(Encoding::UTF_8).gsub(ESCAPE_REGEXP, ESCAPE_ENTITY) end