Skip to content

Commit

Permalink
templates: Mark all void tags as self-closing.
Browse files Browse the repository at this point in the history
This reverses the policy that was set, but incompletely enforced, by
commit 951514d.  The self-closing tag
syntax is clearer, more consistent, simpler to parse, compatible with
XML, preferred by Prettier, and (most importantly now) required by
FormatJS.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
  • Loading branch information
andersk authored and timabbott committed Apr 21, 2021
1 parent 7177529 commit dd3fa4a
Show file tree
Hide file tree
Showing 84 changed files with 345 additions and 346 deletions.
4 changes: 2 additions & 2 deletions analytics/tests/test_views.py
Expand Up @@ -584,8 +584,8 @@ def assert_user_details_in_html_response(
'<span class="label">user</span>\n',
f"<h3>{full_name}</h3>",
f"<b>Email</b>: {email}",
"<b>Is active</b>: True<br>",
f"<b>Role</b>: {role}<br>",
"<b>Is active</b>: True<br />",
f"<b>Role</b>: {role}<br />",
],
html_response,
)
Expand Down
6 changes: 3 additions & 3 deletions static/html/5xx.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="UTF-8" />
<title>Zulip - 500 internal server error</title>
<base href="/static/webpack-bundles/">
<base href="/static/webpack-bundles/" />

<meta http-equiv="refresh" content="60;URL='/'">
<meta http-equiv="refresh" content="60;URL='/'" />

</head>

Expand Down
2 changes: 1 addition & 1 deletion static/templates/admin_profile_field_list.hbs
Expand Up @@ -39,7 +39,7 @@
<div class="input-group">
<label for="profile_field_choices_edit">{{t "Field choices" }}</label>
<div class="profile-field-choices" name="profile_field_choices_edit">
<hr>
<hr />
<div class="edit_profile_field_choices_container">
{{#each choices}}
{{> settings/profile_field_choice }}
Expand Down
4 changes: 2 additions & 2 deletions static/templates/buddy_list_tooltip_content.hbs
Expand Up @@ -5,9 +5,9 @@
{{/if}}
</span>
{{#if second_line}}
<br><span class="tooltip_inner_content">{{second_line}}</span>
<br /><span class="tooltip_inner_content">{{second_line}}</span>
{{/if}}
{{#if third_line}}
<br><span class="tooltip_inner_content">{{third_line}}</span>
<br /><span class="tooltip_inner_content">{{third_line}}</span>
{{/if}}
</div>
2 changes: 1 addition & 1 deletion static/templates/compose_control_buttons.hbs
Expand Up @@ -8,7 +8,7 @@
<a role="button" class="compose_control_button fa fa-smile-o" aria-label="{{t 'Add emoji' }}" id="emoji_map" tabindex=0 title="{{t 'Add emoji' }}"></a>
{{#if giphy_api_available }}
<a role="button" class="compose_control_button" aria-label="{{t 'Add GIF' }}" id="compose_box_giphy_grid" title="{{t 'Add GIF' }}">
<img class="compose_giphy_logo" tabindex=0 src="/static/images/GIPHY_logo.png">
<img class="compose_giphy_logo" tabindex=0 src="/static/images/GIPHY_logo.png" />
</a>
{{/if}}
<a class="message-control-link drafts-link" href="#drafts" title="{{t 'Drafts' }} (d)">{{t 'Drafts' }}</a>
Expand Down
4 changes: 2 additions & 2 deletions static/templates/giphy_picker.hbs
Expand Up @@ -2,7 +2,7 @@
<div class="arrow"></div>
<div class="popover-inner">
<div class="search-box">
<input type="text" tabindex=0 id="giphy-search-query" class="search-query" placeholder="{{t 'Search GIFs' }}">
<input type="text" tabindex=0 id="giphy-search-query" class="search-query" placeholder="{{t 'Search GIFs' }}" />
<button type="button" class="btn clear_search_button" id="giphy_search_clear">
<i class="fa fa-remove" aria-hidden="true"></i>
</button>
Expand All @@ -15,7 +15,7 @@
<div class="giphy-content"></div>
</div>
<div class="popover-footer">
<img src="/static/images/GIPHY_attribution.png" alt="{{t 'GIPHY attribution' }}">
<img src="/static/images/GIPHY_attribution.png" alt="{{t 'GIPHY attribution' }}" />
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion static/templates/hotspot_overlay.hbs
Expand Up @@ -7,7 +7,7 @@
<p class="hotspot-description">{{description}}</p>
</div>
<div class="hotspot-popover-bottom">
<img class="hotspot-img" alt=_("hotspot illustration") src="{{img}}">
<img class="hotspot-img" alt=_("hotspot illustration") src="{{img}}" />
<button class="hotspot-confirm">{{t 'Got it!' }}</button>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/intro_reply_hotspot.hbs
@@ -1,7 +1,7 @@
<div class="hotspot-inline trailing_bookend bookend hotspot-message" id="hotspot_intro_reply_icon">
<div class="hotspot-inline-top"><h1 class="hotspot-title">Send a reply</h1></div>
<div class="hotspot-inline-left">
<img class="hotspot-img" alt="" src="/static/images/hotspots/whale.svg">
<img class="hotspot-img" alt="" src="/static/images/hotspots/whale.svg" />
</div>
<div class="hotspot-inline-right">
<p>{{t 'Click anywhere on a message to reply.' }}</p>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/markdown_help.hbs
Expand Up @@ -24,7 +24,7 @@
</tbody>
</table>
</div>
<hr>
<hr />
<a href="/help/format-your-message-using-markdown" target="_blank" rel="noopener noreferrer">{{t "Detailed message formatting documentation" }}</a>
</div>
</div>
6 changes: 3 additions & 3 deletions static/templates/message_edit_form.hbs
Expand Up @@ -20,13 +20,13 @@
<input type="text" placeholder="{{topic}}" value="{{topic}}" class="message_edit_topic" id="message_edit_topic" />
<div class="message_edit_breadcrumb_messages" style='display:none;'>
<label class="checkbox">
<input class="send_notification_to_new_thread" name="send_notification_to_new_thread" type="checkbox" {{#if notify_new_thread}}checked="checked"{{/if}}>
<input class="send_notification_to_new_thread" name="send_notification_to_new_thread" type="checkbox" {{#if notify_new_thread}}checked="checked"{{/if}} />
<span></span>
</label>
<label for="send_notification_to_new_thread">{{t "Send notification to new topic" }}</label>
<div class="break-row"></div> <!-- break -->
<label class="checkbox">
<input class="send_notification_to_old_thread" name="send_notification_to_old_thread" type="checkbox" {{#if notify_old_thread}}checked="checked"{{/if}}>
<input class="send_notification_to_old_thread" name="send_notification_to_old_thread" type="checkbox" {{#if notify_old_thread}}checked="checked"{{/if}} />
<span></span>
</label>
<label for="send_notification_to_old_thread">{{t "Send notification to old topic" }}</label>
Expand Down Expand Up @@ -70,7 +70,7 @@
<a role="button" tabindex=0 class="compose_control_button fa fa-smile-o" aria-label="{{t 'Add emoji' }}" id="emoji_map" data-message-id="{{message_id}}" title="{{t 'Add emoji' }}"></a>
{{#if giphy_api_available }}
<a role="button" class="compose_control_button" aria-label="{{t 'Add GIF' }}" id="compose_box_giphy_grid" title="{{t 'Add GIF' }}">
<img class="compose_giphy_logo" tabindex=0 src="/static/images/GIPHY_logo.png" data-message-id="{{message_id}}">
<img class="compose_giphy_logo" tabindex=0 src="/static/images/GIPHY_logo.png" data-message-id="{{message_id}}" />
</a>
{{/if}}
<a role="button" tabindex=0 class="message-control-link" data-overlay-trigger="message-formatting" >{{t 'Help' }}</a>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/message_edit_history.hbs
Expand Up @@ -14,5 +14,5 @@
{{/if}}
<div class="message_author"><div class="author_details">{{ posted_or_edited }} {{ edited_by }}</div></div>
</div>
<hr>
<hr />
{{/each}}
10 changes: 5 additions & 5 deletions static/templates/move_topic_to_stream.hbs
Expand Up @@ -20,17 +20,17 @@
{{/each}}
</select>
<i class="fa fa-angle-right" aria-hidden="true"></i>
<input name="new_topic_name" type="text" class="inline_topic_edit" value="{{topic_name}}">
<input name="old_topic_name" type="hidden" class="inline_topic_edit" value="{{topic_name}}">
<input name="current_stream_id" type="hidden" value="{{current_stream_id}}">
<input name="new_topic_name" type="text" class="inline_topic_edit" value="{{topic_name}}" />
<input name="old_topic_name" type="hidden" class="inline_topic_edit" value="{{topic_name}}" />
<input name="current_stream_id" type="hidden" value="{{current_stream_id}}" />
<div class="topic_move_breadcrumb_messages new-style">
<label class="checkbox">
<input class="send_notification_to_new_thread" name="send_notification_to_new_thread" type="checkbox" {{#if notify_new_thread}}checked="checked"{{/if}}>
<input class="send_notification_to_new_thread" name="send_notification_to_new_thread" type="checkbox" {{#if notify_new_thread}}checked="checked"{{/if}} />
<span></span>
</label>
<label for="send_notification_to_new_thread">{{t "Send notification to new topic" }}</label>
<label class="checkbox">
<input class="send_notification_to_old_thread" name="send_notification_to_old_thread" type="checkbox" {{#if notify_old_thread}}checked="checked"{{/if}}>
<input class="send_notification_to_old_thread" name="send_notification_to_old_thread" type="checkbox" {{#if notify_old_thread}}checked="checked"{{/if}} />
<span></span>
</label>
<label for="send_notification_to_old_thread">{{t "Send notification to old topic" }}</label>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/new_stream_users.hbs
Expand Up @@ -17,7 +17,7 @@
{{/each}}
</div>

<br>
<br />
<input class="add-user-list-filter" name="user_list_filter" type="text"
autocomplete="off" placeholder="{{t "Filter" }}" />

Expand Down
2 changes: 1 addition & 1 deletion static/templates/recent_topics_table.hbs
Expand Up @@ -3,7 +3,7 @@
{{> recent_topics_filters}}
</div>
<div class="search_group" role="group">
<input type="text" id="recent_topics_search" value="{{ search_val }}" placeholder="{{t 'Filter topics (t)' }}">
<input type="text" id="recent_topics_search" value="{{ search_val }}" placeholder="{{t 'Filter topics (t)' }}" />
<button type="button" class="btn clear_search_button" id="recent_topics_search_clear">
<i class="fa fa-remove" aria-hidden="true"></i>
</button>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/settings/account_settings.hbs
Expand Up @@ -184,7 +184,7 @@
</div>
</div>

<hr class="settings_separator">
<hr class="settings_separator" />

<div class="form-horizontal" id="api_key_button_box">
<h3>{{t "API key" }}</h3>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/settings/default_streams_list_admin.hbs
Expand Up @@ -11,7 +11,7 @@
<div class="settings-section-title">{{t "Add new default stream" }}</div>
<div class="inline-block" id="default_stream_inputs">
<label for="default_stream_name">{{t "Stream name" }}</label>
<input class="create_default_stream" type="text" placeholder="{{t "Stream name" }}" name="stream_name" autocomplete="off" aria-label="{{t "Stream name" }}">
<input class="create_default_stream" type="text" placeholder="{{t "Stream name" }}" name="stream_name" autocomplete="off" aria-label="{{t "Stream name" }}" />
</div>
<div class="inline-block">
<button type="submit" id="do_submit_stream" class="button rounded sea-green">{{t "Add stream" }}</button>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/stream_sidebar_actions.hbs
Expand Up @@ -11,7 +11,7 @@
</p>
</li>

<hr>
<hr />

{{! tabindex="0" Makes anchor tag focusable. Needed for keyboard support. }}
<li>
Expand Down
2 changes: 1 addition & 1 deletion static/templates/stream_subscription_info.hbs
Expand Up @@ -4,7 +4,7 @@
{{/if}}
<a data-user-id="{{user_id}}" class="view_user_profile">{{full_name}}</a>{{#unless @last}},{{else}}.{{/unless}}
{{/each}}
<br>
<br />
{{#each already_subscribed_users}}
{{#if @first}}
{{t "Already subscribed users:" }}
Expand Down
2 changes: 1 addition & 1 deletion static/templates/topic_sidebar_actions.hbs
Expand Up @@ -6,7 +6,7 @@
</p>
</li>

<hr>
<hr />

{{#if can_mute_topic}}
<li>
Expand Down
4 changes: 2 additions & 2 deletions static/templates/user_group_info_popover_content.hbs
Expand Up @@ -5,7 +5,7 @@
{{group_description}}
</div>
</div>
<hr>
<hr />
<ul class="nav nav-list member-list" data-simplebar data-simplebar-auto-hide="false">
{{#each members}}
<li>
Expand All @@ -20,7 +20,7 @@
</li>
{{/each}}
</ul>
<hr>
<hr />
<ul class="nav nav-list manage-group">
<li>
<a href="#organization/user-groups-admin">
Expand Down
8 changes: 4 additions & 4 deletions static/templates/user_info_popover_content.hbs
Expand Up @@ -52,7 +52,7 @@
</div>

{{#if is_me}}
<hr>
<hr />
{{#if can_set_away}}
<li>
<a tabindex="0" class="set_away_status">
Expand Down Expand Up @@ -80,7 +80,7 @@
{{/if}}

{{#if status_text}}
{{#unless is_me}}<hr>{{/unless}}
{{#unless is_me}}<hr />{{/unless}}
<li class="user_info_status_text">
<span id="status_message">
{{status_text}}
Expand All @@ -89,7 +89,7 @@
</li>
{{/if}}

<hr>
<hr />
{{#if show_user_profile}}
<li>
<a tabindex="0" class="view_full_user_profile">
Expand Down Expand Up @@ -134,7 +134,7 @@
</a>
</li>
{{/if}}
<hr>
<hr />
<li>
<a href="{{ pm_with_uri }}" class="narrow_to_private_messages">
<i class="fa fa-lock" aria-hidden="true"></i>
Expand Down
4 changes: 2 additions & 2 deletions static/templates/user_profile_modal.hbs
Expand Up @@ -14,7 +14,7 @@
</a>
{{/if}}
</div>
<br>
<br />
{{#if show_email}}
<div id="email" class="default-field">
<span class="name">{{#tr}}Email{{/tr}}</span>
Expand All @@ -40,7 +40,7 @@
</div>
{{/if}}
</div>
<hr>
<hr />
<div id="content">
{{#each profile_data}}
<div data-type="{{this.type}}" class="field-section custom_user_field" data-field-id="{{this.id}}">
Expand Down
2 changes: 1 addition & 1 deletion static/templates/widgets/poll_widget.hbs
Expand Up @@ -18,5 +18,5 @@
<input type="text" class="poll-option" placeholder="{{t 'New choice'}}" />
<button class="poll-option">{{t "Add choice" }}</button>
</div>
<br>
<br />
</div>
2 changes: 1 addition & 1 deletion static/templates/widgets/todo_widget_tasks.hbs
@@ -1,4 +1,4 @@
<br>
<br />
{{#each pending_tasks}}
<li>
<button class="task" data-key="{{ key }}">
Expand Down
2 changes: 1 addition & 1 deletion templates/500.html
Expand Up @@ -2,7 +2,7 @@

{% block customhead %}
{{ super() }}
<meta http-equiv="refresh" content="60;URL='/'">
<meta http-equiv="refresh" content="60;URL='/'" />
{% endblock %}

{% block portico_class_name %}error{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions templates/analytics/activity.html
Expand Up @@ -12,13 +12,13 @@

{% if not is_home %}
<a class="show-all" href="/activity">Home</a>
<br>
<br />
{% endif %}

<h4>{{ title }}</h4>

{% if realm_link %}
<a href="{{ realm_link }}">Graph</a><br>
<a href="{{ realm_link }}">Graph</a><br />
{% endif %}

<ul class="nav nav-tabs">
Expand Down

0 comments on commit dd3fa4a

Please sign in to comment.