datatracker/ietf/templates/doc/document_review.html
Lars Eggert 5598762608
fix: add more HTML validation & fixes (#3891)
* Update vnu.jar

* Fix py2 -> py3 issue

* Run pyupgrade

* test: Add default-jdk to images

* test: Add option to also validate HTML with vnu.jar

Since it's already installed in bin. Don't do this by default, since it
increases the time needed for tests by ~50%.

* fix: Stop the urlizer from urlizing in linkified mailto: text

* More HTML fixes

* More HTML validation fixes

* And more HTML fixes

* Fix floating badge

* Ignore unicode errors

* Only URLize docs that are existing

* Final fixes

* Don't URLize everything during test-crawl

* Feed HTML into vnu using python rather than Java to speed things up

* Allow test-crawl to start vnu on a different port

* Increase retry count to vnu. Restore batch size to 30.

* More HTML validation fixes

* Use urllib3 to make requests to vnu, since overriding requests_mock is tricky

* Undo commit of unmodified file

* Also urlize ftp links

* Fix matching of file name

* More HTML fixes

* Add `is_valid_url` filter

* weekday -> data-weekday

* urlencode URLs

* Add and use vnu_fmt_message. Bump vnu max buffer.

* Simplify doc_exists

* Don't add tab link to mail archive if the URL is invalid

* Run urlize_ietf_docs before linkify

Reduces the possibility of generating incorrect HTML

* Undo superfluous change

* Runner fixes

* Consolidate vnu message filtering into vnu_filter_message

* Correctly handle multiple persons with same name

* Minimze diff

* Fix HTML nits

* Print source snippet in vnu_fmt_message

* Only escape if there is something to escape

* Fix snippet

* Skip crufty old IPR declarations

* Only include modal when needed. Add handles.

* Fix wordwrap+linkification

* Update ietf/doc/templatetags/ietf_filters.py

* Update ietf/doc/templatetags/tests_ietf_filters.py

* Don't right-align second column
2022-05-03 13:55:48 -05:00

55 lines
2.1 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2016-2019, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load ietf_filters %}
{% load textfilters %}
{% block title %}{{ doc.title }}{% endblock %}
{% block content %}
{% origin %}
{{ top|safe }}
{% include "doc/revisions_list.html" %}
{% if review_req %}
{% include "doc/review/request_info.html" %}
{% else %}
<div class="alert alert-warning my-3">This review has no associated review request</div>
{% endif %}
{% if doc.rev != latest_rev %}
<div class="alert alert-warning my-3">The information below is for an old version of the document.</div>
{% endif %}
{% if doc.get_state_slug != "active" or other_reviews %}
<table class="table table-sm table-borderless">
<tbody class="meta border-top">
{% if doc.get_state_slug != "active" %}
<tr>
<td></td>
<th scope="row">State</th>
<td class="edit"></td>
<td>{{ doc.get_state.name }}</td>
</tr>
{% endif %}
{% if other_reviews %}
<tr>
<td></td>
<th scope="row">Other reviews</th>
<td class="edit"></td>
<td>
{% for review_assignment in other_reviews %}
{% include "doc/review_assignment_summary.html" with current_doc_name=review_assignment.review_request.doc.name current_rev=review_assignment.reviewed_rev %}
{% endfor %}
</td>
</tr>
{% endif %}
</tbody>
</table>
{% endif %}
{% if doc.rev and content != None %}
<div class="card mt-5">
<div class="card-header">{{ doc.name }}-{{ doc.rev }}</div>
<div class="card-body">
<pre class="pasted">{{ content|maybewordwrap|urlize_ietf_docs|linkify }}</pre>
</div>
</div>
{% endif %}
{% endblock %}