templates: Use <hr> and <br> consistently.

We now prevent these variations:

    * <hr/>
    * <hr />
    * <br/>
    * <br />

We could enforce similar consistency for other void
tags, if we wished, but these two are particularly
prevalent.
This commit is contained in:
Steve Howell
2020-04-19 10:52:45 +00:00
committed by Tim Abbott
parent 1be4cc5f17
commit cf78cb0d6e
39 changed files with 72 additions and 74 deletions

View File

@@ -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 }}

View File

@@ -1,9 +1,9 @@
<div class="buddy_list_tooltip_content">
<span class="tooltip_inner_content">{{first_line}}</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>

View File

@@ -2,9 +2,9 @@
<span class="compose-all-everyone-msg">
{{#tr this}}
Are you sure you want to mention all <strong>__count__</strong> people in this stream?
<br />
<br>
This will send email and mobile push notifications to most of those <strong>__count__</strong> users.
<br />
<br>
If you don't want to do that, please edit your message to remove the <strong>@__mention__</strong> mention.
{{/tr}}
</span>

View File

@@ -2,7 +2,7 @@
<span class="compose-announce-msg">
{{#tr this}}
This stream is reserved for <strong>announcements</strong>.
<br />
<br>
Are you sure you want to message all <strong>__count__</strong> people in this stream?
{{/tr}}
</span>

View File

@@ -14,5 +14,5 @@
{{/if}}
<div class="message_author"><div class="author_details">{{ posted_or_edited }} {{ edited_by }}</div></div>
</div>
<hr/>
<hr>
{{/each}}

View File

@@ -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" }}" />

View File

@@ -201,7 +201,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>
@@ -212,7 +212,7 @@
An API key can be used to programmatically access a Zulip account.
Anyone with access to your API key has the ability to read your messages, send
messages on your behalf, and otherwise impersonate you on Zulip, so you should
guard your API key as carefully as you guard your password. <br />
guard your API key as carefully as you guard your password. <br>
We recommend creating bots and using the bots' accounts and API keys to access
the Zulip API, unless the task requires access to your account.
{{/tr}}

View File

@@ -52,7 +52,7 @@
</div>
{{#if is_me}}
<hr />
<hr>
{{#if can_set_away}}
<li>
<a href="#" class="set_away_status">
@@ -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}}
@@ -89,7 +89,7 @@
</li>
{{/if}}
<hr />
<hr>
{{#if show_user_profile}}
<li>
<a href="#" class="view_user_profile">
@@ -124,7 +124,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>

View File

@@ -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>

View File

@@ -1,4 +1,4 @@
<br />
<br>
{{#each pending_tasks}}
<li>
<button class="task" data-key="{{ key }}">

View File

@@ -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">

View File

@@ -103,7 +103,7 @@
<span data-toggle="tooltip" class="last_update_tooltip" data-html="true" title="{% trans %}A full update of all the graphs happens once a day.<br/>The “Messages Sent Over Time” graph is updated once an hour.{% endtrans %}">
<span class="fa fa-info-circle" id="id_last_update_question_sign"></span>
</span>
<br />
<br>
<span class="docs_link"><a href="/help/analytics">{{ _("Analytics documentation") }}</a></span>
</div>
</div>

View File

@@ -176,8 +176,8 @@
</li>
</ul>
<br />
<hr />
<br>
<hr>
<h2 id="fullstack">Senior Full Stack Engineer</h2>
<p>
@@ -245,8 +245,8 @@
</li>
</ul>
<br />
<hr />
<br>
<hr>
<h2>How to apply for a job</h2>
<p>

View File

@@ -38,7 +38,7 @@
<li><p>Get your Zulip API key from the Zulip "Settings" panel and put it in a file in your
Athena home directory called <code>~/Private/.zulip-api-key</code>.</p></li>
<li><p>Run the following command to copy over all of your subscriptions:<br />
<li><p>Run the following command to copy over all of your subscriptions:<br>
<code>/mit/tabbott/zulip/zephyr_mirror.py --sync-subscriptions</code></p>
<p> <strong>NOTE</strong>: Zulip supports several ways to control what messages you want to read

View File

@@ -48,10 +48,10 @@ the registration flow has its own (nearly identical) copy of the fields below in
{% endfor %}
{% endif %}
</div>
<br />
<br>
<div class="control-group">
<div class="controls">
<input type="submit" class="btn btn-primary" value="{{ _('Enter') }}" /><br />
<input type="submit" class="btn btn-primary" value="{{ _('Enter') }}" /><br>
<input type="hidden" name="next" value="{{ next }}" />
</div>
</div>

View File

@@ -29,7 +29,7 @@ page can be easily identified in it's respective JavaScript file -->
</div>
<div class="invite-required">
<hr />
<hr>
<i class="fa fa-lock"></i>{{ _("You need an invitation to join this organization.") }}
</div>
</div>

View File

@@ -307,7 +307,7 @@
</tr>
</table>
</div>
<hr/>
<hr>
<a href="/help/keyboard-shortcuts" target="_blank">{% trans %}Detailed keyboard shortcuts documentation{% endtrans %}</a>
</div>
</div>

View File

@@ -29,11 +29,11 @@
<td class="rendered_markdown"><a href="https://zulip.org" target="_blank">Zulip website</a></td>
</tr>
<tr>
<td>* Milk<br/>
* Tea<br/>
&nbsp;&nbsp;* Green tea<br/>
&nbsp;&nbsp;* Black tea<br/>
&nbsp;&nbsp;* Oolong tea<br/>
<td>* Milk<br>
* Tea<br>
&nbsp;&nbsp;* Green tea<br>
&nbsp;&nbsp;* Black tea<br>
&nbsp;&nbsp;* Oolong tea<br>
* Coffee
</td>
<td class="rendered_markdown">
@@ -51,12 +51,12 @@
</td>
</tr>
<tr>
<td>1. Milk<br/>
1. Tea<br/>
<td>1. Milk<br>
1. Tea<br>
1. Coffee
</td>
<td class="rendered_markdown">1. Milk<br/>
2. Tea<br/>
<td class="rendered_markdown">1. Milk<br>
2. Tea<br>
3. Coffee
</td>
</tr>
@@ -65,12 +65,12 @@
<td class="rendered_markdown"><img alt=":heart:" class="emoji" src="/static/generated/emoji/images/emoji/heart.png" title=":heart:" /></td>
</tr>
<tr>
<td>@**Joe Smith**<br/>
<td>@**Joe Smith**<br>
(autocompletes from @joe)</td>
<td class="rendered_markdown"><span class="user-mention">@Joe Smith</span> (notifies Joe Smith)</td>
</tr>
<tr>
<td>@_**Joe Smith**<br/>
<td>@_**Joe Smith**<br>
(autocompletes from @_joe)</td>
<td class="rendered_markdown"><span class="user-mention">Joe Smith</span> (links to profile but doesn't notify Joe Smith)</td>
</tr>
@@ -83,7 +83,7 @@
<td class="rendered_markdown"><a>#streamName</a> (links to a stream)</td>
</tr>
<tr>
<td>/me is busy working<br/>
<td>/me is busy working<br>
(send a status message as user Iago)</td>
<td class="rendered_markdown"><span class="sender_name-in-status">Iago</span> is busy working</td>
</tr>
@@ -152,7 +152,7 @@ Quoted block
</tbody>
</table>
</div>
<hr/>
<hr>
<a href="/help/format-your-message-using-markdown" target="_blank">Detailed message formatting documentation</a>
</div>
</div>

View File

@@ -112,7 +112,7 @@
<span class="operator_value">{{ placeholder_keyword }}</span>.
{% endtrans %}
</p>
<hr/>
<hr>
<a href="/help/search-for-messages#search-operators" target="_blank">{% trans %}Detailed search operators documentation{% endtrans %}</a>
</div>
</div>

View File

@@ -9,7 +9,7 @@
<div class="errorbox config-error">
<div class="errorcontent">
<h1 class="lead">Configuration error</h1>
<br/>
<br>
{% if error_name == "ldap_error_realm_is_none" %}
{% trans %}
You are trying to login using LDAP without creating an

View File

@@ -26,7 +26,7 @@
{{ _("Log in with another account") }}
</button>
</form>
<br/>
<br>
<form class="form-inline" id="send_confirm" name="send_confirm"
action="{{ continue_link }}" method="get">
<button class="outline">

View File

@@ -41,14 +41,14 @@
</tr>
<tr>
<td><a href="/emails">/emails</a></td>
<td><code>./scripts/setup/inline_email_css.py</code><br/>
<td><code>./scripts/setup/inline_email_css.py</code><br>
Run the command if you made changes to source.html email templates.
</td>
<td>View outgoing and example emails.</td>
</tr>
<tr>
<td><a href="/stats/realm/analytics/">/stats/realm/analytics/</a></td>
<td><code>./manage.py populate_analytics_db</code><br/>
<td><code>./manage.py populate_analytics_db</code><br>
Run the command after changing analytics data population logic.
</td>
<td>View the /stats page with some pre-populated data</td>

View File

@@ -22,7 +22,7 @@
{{ render_markdown_path(article, api_uri_context) }}
<div id="footer" class="documentation-footer">
<hr />
<hr>
<p>We're here to help! Email us at <a href="mailto:{{ support_email }}">{{ support_email }}</a> with questions, feedback, or feature requests.</p>
</div>
</div>

View File

@@ -13,4 +13,4 @@
<div class="email-text" style="display: none;">
<pre>{{ body }}</pre>
</div>
<hr/>
<hr>

View File

@@ -46,7 +46,7 @@
<label for="forward_address"><strong>Address to which emails should be forwarded</strong></label>
<input type="text" id="address" name="forward_address" placeholder="eg: your-email@example.com" value="{{forward_address}}"/>
</div>
<br/>
<br>
<div class="alert alert-info">
You must setup SMTP as described
<a target="_blank" href="https://zulip.readthedocs.io/en/latest/subsystems/email.html#development-and-testing">

View File

@@ -29,7 +29,7 @@
<p>{{ new_streams.html|display_list(1000)|safe }}.</p>
{% endif %}
<br />
<br>
<p><a href="{{ realm_uri }}">Click here to log in to Zulip and catch up.</a></p>
{% endblock %}

View File

@@ -17,15 +17,15 @@
<p>
{{ _('Your account details:') }}
<li>{{ _('Organization URL:') }} {{ realm_uri }}<br/></li>
<li>{{ _('Organization URL:') }} {{ realm_uri }}<br></li>
{% if ldap %}
{% if ldap_username %}
<li>{{ _('Username:') }} {{ ldap_username }}<br/></li>
<li>{{ _('Username:') }} {{ ldap_username }}<br></li>
{% else %}
<li>{{ _('Use your LDAP account to login') }}<br/></li>
<li>{{ _('Use your LDAP account to login') }}<br></li>
{% endif %}
{% else %}
<li>{{ _('Email:') }} {{ email }}<br/></li>
<li>{{ _('Email:') }} {{ email }}<br></li>
{% endif %}
{% trans %}(you'll need these to sign in to the <a href="https://zulipchat.com/apps">mobile and desktop</a> apps){% endtrans %}
</p>
@@ -39,7 +39,7 @@
</p>
<p>
{{ _("Cheers,") }}<br />
{{ _("Cheers,") }}<br>
{{ _("Team Zulip") }}
</p>

View File

@@ -24,7 +24,7 @@
<p><a href="{{ realm_uri }}">{{ _("Take it for a spin now.") }}</a></p>
<p>{{ _("Thanks,") }}<br />{{ _("Zulip") }}</p>
<p>{{ _("Thanks,") }}<br>{{ _("Zulip") }}</p>
{% endblock %}
{% block manage_preferences %}

View File

@@ -10,7 +10,7 @@
{% trans %}The email associated with your Zulip account was recently changed to <a href="{{ new_email }}">{{ new_email }}</a>. If you did not request this change, please contact us immediately at <a href="mailto:{{ support_email }}">{{ support_email }}</a>.{% endtrans %}
</p>
<p>
{{ _("Best,") }}<br />
{{ _("Best,") }}<br>
{{ _("Team Zulip") }}
</p>
{% endblock %}

View File

@@ -37,7 +37,7 @@
</p>
<p>
{{ _("Thanks,") }}<br />
{{ _("Thanks,") }}<br>
{{ _("Zulip Security") }}
</p>
{% endblock %}

View File

@@ -104,7 +104,7 @@
</div>
</div>
<hr />
<hr>
<div class="company-container">
<header>

View File

@@ -171,7 +171,7 @@
Zulip has modern apps for every major platform,
powered by Electron and React Native.
</p>
<br />
<br>
</div>
<div class="platform-icons">
@@ -503,7 +503,7 @@
</div>
</div>
<hr />
<hr>
<div class="company-container">
<header>

View File

@@ -85,7 +85,7 @@
</h4>
</a>
{% endfor %}
<hr/>
<hr>
<h3>{% trans %}Custom integrations{% endtrans %}</h3>
<a href="/api/incoming-webhooks-overview">
<h4>{% trans %}Incoming webhooks{% endtrans %}</h4>

View File

@@ -9,7 +9,7 @@
<div class="app-main white-box">
{{ _('Hi there! Thank you for your interest in Zulip.') }}
<br />
<br>
{% trans %}There is no Zulip organization hosted at this subdomain.{% endtrans %}
</div>
</div>

View File

@@ -28,7 +28,7 @@
<div class="description">
Try Zulip for an unlimited period of time.
</div>
<hr />
<hr>
<ul class="feature-list">
<li>10,000 messages of search history</li>
<li>File storage up to 5 GB total</li>
@@ -61,7 +61,7 @@
<div class="description">
Make Zulip your home.
</div>
<hr />
<hr>
<ul class="feature-list">
<li>Full search history</li>
<li>File storage up to 10 GB per user</li>
@@ -77,7 +77,7 @@
<div class="price">6<span class="price-cents">.67</span></div>
<div class="details">
per user per month
<br />
<br>
$8/month billed monthly
</div>
</div>
@@ -110,7 +110,7 @@
<div class="description">
Install your own Zulip server.
</div>
<hr />
<hr>
<ul class="feature-list">
<li>Easy self-service installation</li>
<li>Free and open source forever under Apache 2.0 license</li>
@@ -136,7 +136,7 @@
<div class="description">
For mission-critical installations.
</div>
<hr />
<hr>
<ul class="feature-list">
<li>Easy self-service installation</li>
<li>Support response SLAs</li>

View File

@@ -173,7 +173,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
</section>
{% if default_stream_groups %}
<hr />
<hr>
<div class="default-stream-groups">
<p class="margin">{{ _('What are you interested in?') }}</p>
{% for default_stream_group in default_stream_groups %}
@@ -199,7 +199,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser
</div>
{% endfor %}
</div>
<hr />
<hr>
{% endif %}
<div class="input-group margin terms-of-service">

View File

@@ -128,7 +128,7 @@
<img class="avatar_img" src="<%= avatar %>" alt="{{ _('Avatar') }}" />
</div>
<div class='info'>
<b>@<%= name %></b><br />
<b>@<%= name %></b><br>
<%= commits %> <%= commits === 1 ? 'commit' : 'commits' %>
</div>
</a>

View File

@@ -302,9 +302,7 @@ def is_special_html_tag(s: str, tag: str) -> bool:
return tag in ['link', 'meta', '!DOCTYPE']
OPTIONAL_CLOSING_TAGS = [
'br',
'circle',
'hr',
'img',
'input',
'path',

View File

@@ -98,7 +98,7 @@ class APIArgumentsTablePreprocessor(Preprocessor):
<span class="api-argument-example-label">Example</span>: <code>{example}</code>
</div>
<div class="api-description">{description}</div>
<hr />
<hr>
</div>"""
md_engine = markdown.Markdown(extensions=[])