##// END OF EJS Templates
helpers: fix metatags extraction in case description is empty
marcink -
r2226:c2059633 stable
parent child Browse files
Show More
@@ -986,10 +986,10 b' def extract_metatags(value):'
986 986 """
987 987 Extract supported meta-tags from given text value
988 988 """
989 tags = []
989 990 if not value:
990 return ''
991 return tags, ''
991 992
992 tags = []
993 993 for key, val in tags_paterns.items():
994 994 pat, replace_html = val
995 995 tags.extend([(key, x.group()) for x in pat.finditer(value)])
@@ -187,6 +187,14 b' def test_age_in_future(age_args, expecte'
187 187
188 188
189 189 @pytest.mark.parametrize("sample, expected_tags", [
190 # entry
191 ((
192 ""
193 ),
194 [
195
196 ]),
197 # entry
190 198 ((
191 199 "hello world [stale]"
192 200 ),
General Comments 0
You need to be logged in to leave comments. Login now