From df566d79c442daceb169454a1003c39e9e71b325 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Fri, 11 Jan 2019 07:56:59 +0100 Subject: correct checking of non-ASCII anchor names fix provided by Dandaleon Flux vie email --- compat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compat.py b/compat.py index 7355470..5cfb0bf 100644 --- a/compat.py +++ b/compat.py @@ -231,11 +231,11 @@ def check_namespace_char(ch): # type: (Any) -> bool if u'\x21' <= ch <= u'\x7E': # ! to ~ return True - if u'\xA0' <= ch <= u'\xD7FF': + if u'\xA0' <= ch <= u'\uD7FF': return True - if (u'\xE000' <= ch <= u'\xFFFD') and ch != u'\xFEFF': # excl. byte order mark + if (u'\uE000' <= ch <= u'\uFFFD') and ch != u'\uFEFF': # excl. byte order mark return True - if u'\x10000' <= ch <= u'\x10FFFF': + if u'\U00010000' <= ch <= u'\U0010FFFF': return True return False -- cgit v1.2.1