We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed1981a commit 3d1e28dCopy full SHA for 3d1e28d
1 file changed
lib/oai/client.rb
@@ -280,9 +280,11 @@ def parse_date(value)
280
dt.utc
281
end
282
283
-
284
# Strip out invalid UTF-8 characters. Regex from the W3C, inverted.
285
# http://www.w3.org/International/questions/qa-forms-utf-8.en.php
+ #
286
+ # Regex is from WebCollab:
287
+ # http://webcollab.sourceforge.net/unicode.html
288
def strip_invalid_utf_8_chars(xml)
289
simple_bytes = xml.gsub(/[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]
290
| [\x00-\x7F][\x80-\xBF]+
0 commit comments