mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
template_parser: Add parsing support for self closing tags as per HTML5.
In this commit we add support for some tags which are also called void-elements according to http://w3c.github.io/html/syntax.html#void-elements to be parsed by our template parser and get tagged as singleton_html_tags. Fixes: #8387.
This commit is contained in:
@@ -515,7 +515,7 @@ def build_custom_checkers(by_lang):
|
||||
'exclude_line': [('templates/zerver/register.html', 'placeholder="acme"'),
|
||||
('templates/zerver/register.html', 'placeholder="Acme or Aκμή"'),
|
||||
('static/templates/settings/realm-domains-modal.handlebars',
|
||||
'<td><input type="text" class="new-realm-domain" placeholder="acme.com"></input></td>'),
|
||||
'<td><input type="text" class="new-realm-domain" placeholder="acme.com"></td>'),
|
||||
("static/templates/user-groups-admin.handlebars",
|
||||
'<input type="text" name="name" id="user_group_name" placeholder="hamletcharacters" />')],
|
||||
'exclude': set(["static/templates/settings/emoji-settings-admin.handlebars",
|
||||
@@ -523,11 +523,11 @@ def build_custom_checkers(by_lang):
|
||||
"static/templates/settings/bot-settings.handlebars",
|
||||
"templates/zerver/email_log.html"]),
|
||||
'good_lines': ['<input class="stream-list-filter" type="text" placeholder="{{ _(\'Search streams\') }}" />'],
|
||||
'bad_lines': ['<input placeholder="foo"></input>']},
|
||||
'bad_lines': ['<input placeholder="foo">']},
|
||||
{'pattern': "placeholder='[^{]",
|
||||
'description': "`placeholder` value should be translatable.",
|
||||
'good_lines': ['<input class="stream-list-filter" type="text" placeholder="{{ _(\'Search streams\') }}" />'],
|
||||
'bad_lines': ["<input placeholder='foo'></input>"]},
|
||||
'bad_lines': ["<input placeholder='foo'>"]},
|
||||
{'pattern': "aria-label='[^{]",
|
||||
'description': "`aria-label` value should be translatable.",
|
||||
'good_lines': ['<button type="button" class="close close-alert-word-status" aria-label="{{t \'Close\' }}">'],
|
||||
|
||||
Reference in New Issue
Block a user