Skip to content
Snippets Groups Projects
Commit e9cdfb98 authored by Andrew Janke's avatar Andrew Janke Committed by GitHub
Browse files

test-bot: strip additional invalid XML chars under Ruby 1.8.7 (#341)

parent e1f0dec4
No related branches found
No related tags found
No related merge requests found
...@@ -1001,7 +1001,9 @@ module Homebrew ...@@ -1001,7 +1001,9 @@ module Homebrew
invalid_xml_pat = /[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/ invalid_xml_pat = /[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/
output = output.gsub(invalid_xml_pat, "\uFFFD") output = output.gsub(invalid_xml_pat, "\uFFFD")
else else
output = output.delete("\000\a\b\e\f\x2\x1f") # Invalid XML chars, as far as single-byte chars go
output = output.delete("\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f" \
"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f")
end end
# Truncate to 1MB to avoid hitting CI limits # Truncate to 1MB to avoid hitting CI limits
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment