Skip to content

Commit

Permalink
Markdown-support and clickable URLs added in various places. (Not in …
Browse files Browse the repository at this point in the history
…comments, because they're still evil HTML-generating JavaScript voodoo.)
  • Loading branch information
helgihg committed Nov 23, 2018
1 parent 9c943b7 commit 9f95604
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions wasa2il/templates/election/election_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ <h1><small>{% trans "Election:" %}</small> {{ election.name }}</h1>
{% if not voting_interface_enabled or election.election_state != 'voting' or started_voting or step == "vote" %}
<div class="alert alert-success">
<h3>{% trans "About This Election" %}</h3>
<p>{{ election.instructions|safe|linebreaks }}</p>
<p>{{ election.instructions|markdown|urlize }}</p>
</div>
{% endif %}
{% endif %}
Expand Down Expand Up @@ -282,7 +282,7 @@ <h2>{% trans "Votes" %} <small>{% trans "your favorites first!" %}</small></h2>
{% else %}
{% if election.instructions %}
<h2>{% trans "About This Election" %}</h2>
<p>{{ election.instructions|safe|linebreaks }}</p>
<p>{{ election.instructions|markdown|urlize }}</p>
{% endif %}
<h2>{% trans "How To Vote" %}</h2>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion wasa2il/templates/issue/document_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ <h3>{% trans "Versions" %}</h3>
<td style="white-space: nowrap;"><strong>{{ content.get_status_display }}</strong></td>
{% endif %}
<td><a href="/accounts/profile/{{ content.user }}"> {{ content.user.get_full_name|default:content.user.username }}</a></td>
<td>{{ content.comments|linebreaks }}</td>
<td>{{ content.comments|markdown|urlize }}</td>
</tr>
{% endfor %}
{% if action == 'new' %}
Expand Down
2 changes: 1 addition & 1 deletion wasa2il/templates/issue/issue_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h1>{{ issue.name }}</h1>
{% endif %}

<div class="issue-description">
{{ issue.description|linebreaks }}
{{ issue.description|markdown|urlize }}
</div>

<table class="table">
Expand Down
2 changes: 1 addition & 1 deletion wasa2il/templates/issue/stub/document_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@
</div>
{% endif %}
<div id="legal-text" {% if tab == 'diff' %}style="display: none;"{% endif %}>
{{ documentcontent.text|markdown }}
{{ documentcontent.text|markdown|urlize }}
</div>
</div>
2 changes: 1 addition & 1 deletion wasa2il/templates/profile/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1>{% trans "Biography" %}</h1>
<img class="img-thumbnail" src="{{ profile.picture.url }}" />
</div>
{% if profile.bio %}
{{profile.bio|markdown}}
{{ profile.bio|markdown|urlize }}
{% else %}
{% trans "This user hasn't provided a biography." %}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions wasa2il/templates/termsandconditions/tc_view_terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ <h1>
{% if terms.info %}
<h4>{% trans 'Information' %}:</h4>
<div class="toc-container">
<p>{{ terms.info|markdown }}</p>
<p>{{ terms.info|markdown|urlize }}</p>
</div>
{% endif %}

<hr />
{{ terms.text|safe|markdown }}
{{ terms.text|markdown|urlize }}

{% endfor %}

Expand Down

0 comments on commit 9f95604

Please sign in to comment.