diff --git a/lib/rspec_junit_formatter.rb b/lib/rspec_junit_formatter.rb index 75d9dbd..411e01f 100644 --- a/lib/rspec_junit_formatter.rb +++ b/lib/rspec_junit_formatter.rb @@ -93,7 +93,7 @@ def xml_dump_output(example) # Inversion of character range from https://www.w3.org/TR/xml/#charsets ILLEGAL_REGEXP = Regexp.new( - +"[^" << + "[^".dup << "\u{9}" << # => \t "\u{a}" << # => \n "\u{d}" << # => \r @@ -125,7 +125,7 @@ def xml_dump_output(example) # Discouraged characters from https://www.w3.org/TR/xml/#charsets # Plus special characters with well-known entity replacements DISCOURAGED_REGEXP = Regexp.new( - +"[" << + "[".dup << "\u{22}" << # => " "\u{26}" << # => & "\u{27}" << # => '