Open
Description
so get_domain helps extracting a domain name from a title.
webcompat.com/webcompat/templates/__init__.py
Lines 79 to 90 in 8656f17
The function returns the first group of continuous text before a space, but the case return ''
is not covered in the testing
webcompat.com/tests/unit/test_template.py
Lines 43 to 52 in 8656f17
and indeed the only case where this would happen is when title = ''
which is probably not the initial intent of get_domain.
So
- There's a missing test
- There might be a modification to do to the regex to really match what we want.
which is probably along
'staging.webcompat.com - site is not usable'
➡️'staging.webcompat.com'
'site is not usable'
➡️''
Metadata
Metadata
Assignees
Labels
No labels