Skip to content

Commit 3d1e28d

Browse files
committed
Opps, forgot to attribute the regex.
1 parent ed1981a commit 3d1e28d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/oai/client.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,11 @@ def parse_date(value)
280280
dt.utc
281281
end
282282

283-
284283
# Strip out invalid UTF-8 characters. Regex from the W3C, inverted.
285284
# http://www.w3.org/International/questions/qa-forms-utf-8.en.php
285+
#
286+
# Regex is from WebCollab:
287+
# http://webcollab.sourceforge.net/unicode.html
286288
def strip_invalid_utf_8_chars(xml)
287289
simple_bytes = xml.gsub(/[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]
288290
| [\x00-\x7F][\x80-\xBF]+

0 commit comments

Comments
 (0)