dev-python/html5lib: fix sanitizer patch to match upstream
authorZac Medico <zmedico@gentoo.org>
Tue, 28 Mar 2017 19:32:37 +0000 (12:32 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 28 Mar 2017 19:33:31 +0000 (12:33 -0700)
See: https://github.com/html5lib/html5lib-python/commit/17499b9763a090f7715af49555d21fe4b558958b
Package-Manager: Portage-2.3.5, Repoman-2.3.2

dev-python/html5lib/files/html5lib-0.9999999-python3.6-sanitizer-re.patch

index c64cbe1ab3f508e984f30ff69633d52ca6f78160..2fbef2ad0b9e227ba3edb8df624fb4c7f2edd2e0 100644 (file)
@@ -5,7 +5,7 @@
                  if attr not in attrs:
                      continue
 -                val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '',
-+                val_unescaped = re.sub(r"[`\000-\040\177-\240\s]+", '',
++                val_unescaped = re.sub("[`\x00-\x20\x7f-\xa0\\s]+", '',
                                         unescape(attrs[attr])).lower()
                  # remove replacement characters from unescaped characters
                  val_unescaped = val_unescaped.replace("\ufffd", "")