Skip to content

Commit

Permalink
Merge pull request #104 from Retsur/fix_backslash_escape
Browse files Browse the repository at this point in the history
Fixed issue: backslashes were not properly escaped when creating pyth…
  • Loading branch information
brunato authored Apr 25, 2019
2 parents 714b71d + 404de11 commit c20c9d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion xmlschema/codepoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from .compat import PY3, unicode_chr, string_base_type, Iterable, MutableSet
from .exceptions import XMLSchemaValueError, XMLSchemaTypeError, XMLSchemaRegexError

CHARACTER_GROUP_ESCAPED = {ord(c) for c in r'-|.^?*+{}()[]'}
CHARACTER_GROUP_ESCAPED = {ord(c) for c in r'-|.^?*+{}()[]\\'}
"""Code Points of escaped chars in a character group."""

UCS4_MAXUNICODE = 1114111
Expand Down
1 change: 1 addition & 0 deletions xmlschema/regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def get_unicode_subset(key):
'\\)': ')',
'\\[': '[',
'\\]': ']',
'\\\\': '\\',

# Multi-character escapes
'\\s': S_SHORTCUT_SET,
Expand Down

0 comments on commit c20c9d8

Please sign in to comment.