Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyxform/parsing/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# They in turn adapted it from https://www.w3.org/TR/REC-xml/#NT-NameStartChar
# and https://www.w3.org/TR/REC-xml-names/#NT-NCName
namestartchar = (
r"(?:[A-Z]|_|[a-z]|\xc0-\xd6]|[\xd8-\xf6]|[\xf8-\u02ff]|"
r"(?:[A-Z]|_|[a-z]|[\xc0-\xd6]|[\xd8-\xf6]|[\xf8-\u02ff]|"
+ r"[\u0370-\u037d]|[\u037f-\u1fff]|[\u200c-\u200d]|[\u2070-\u218f]|"
+ r"[\u2c00-\u2fef]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD]"
+ r"|[\U00010000-\U000EFFFF])"
Expand Down
4 changes: 4 additions & 0 deletions tests/test_survey_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ def test_validate__invalid_name__error(self):
self.assertEqual(
ErrorCode.NAMES_009.value.format(name=co.NAME), err.exception.args[0]
)

def test_validate__name_in_valid_unicode_range__ok(self):
"""Should not raise an error if the 'name' includes valid unicode characters."""
SurveyElement(name="SäöüÄÖÜß", label="Q1").validate()