diff --git a/nicegui/element.py b/nicegui/element.py index c5556d8cf..ffff5c9d4 100644 --- a/nicegui/element.py +++ b/nicegui/element.py @@ -42,7 +42,7 @@ ' # Match the closing quote ) | # Or - ([\w\-.%:\/]+) # Capture group 4: Value without quotes + ([\w\-.,%:\/]+) # Capture group 4: Value without quotes ) )? # End of optional non-capturing group for value (?:$|\s) # Match end of string or whitespace diff --git a/tests/test_element.py b/tests/test_element.py index b3515adb4..a19f6a81b 100644 --- a/tests/test_element.py +++ b/tests/test_element.py @@ -50,6 +50,7 @@ def test_props_parsing(): assert ui.element._parse_props('href=http://192.168.42.100/') == {'href': 'http://192.168.42.100/'} assert ui.element._parse_props('hint="Your \\"given\\" name"') == {'hint': 'Your "given" name'} assert ui.element._parse_props('input-style="{ color: #ff0000 }"') == {'input-style': '{ color: #ff0000 }'} + assert ui.element._parse_props('accept=.jpeg,.jpg,.png') == {'accept': '.jpeg,.jpg,.png'} assert ui.element._parse_props('empty=""') == {'empty': ''} assert ui.element._parse_props("empty=''") == {'empty': ''}