diff --git a/ietf/templates/doc/document_referenced_by.html b/ietf/templates/doc/document_referenced_by.html
index 30d536d79..3557ecf56 100644
--- a/ietf/templates/doc/document_referenced_by.html
+++ b/ietf/templates/doc/document_referenced_by.html
@@ -64,7 +64,7 @@
                             </a>
                         </td>
                         <td>
-                            {% ifequal ref.source.get_state.slug 'rfc' %}
+                            {% if ref.source.get_state.slug == 'rfc' %}
                                 {% with ref.source.std_level as lvl %}
                                     {% if lvl %}{{ lvl }}{% endif %}
                                 {% endwith %}
@@ -72,7 +72,7 @@
                                 {% with ref.source.intended_std_level as lvl %}
                                     {% if lvl %}{{ lvl }}{% endif %}
                                 {% endwith %}
-                            {% endifequal %}
+                            {% end %}
                         </td>
                         <td>{{ ref.relationship.name }}</td>
                         <td>{{ ref.is_downref|default:'' }}</td>
diff --git a/ietf/templates/doc/document_references.html b/ietf/templates/doc/document_references.html
index 4578d6b8c..d9134be6f 100644
--- a/ietf/templates/doc/document_references.html
+++ b/ietf/templates/doc/document_references.html
@@ -51,7 +51,7 @@
                             </a>
                         </td>
                         <td>
-                            {% ifequal ref.target.document.get_state.slug 'rfc' %}
+                            {% if ref.target.document.get_state.slug == 'rfc' %}
                                 {% with ref.target.document.std_level as lvl %}
                                     {% if lvl %}{{ lvl }}{% endif %}
                                 {% endwith %}
@@ -59,7 +59,7 @@
                                 {% with ref.target.document.intended_std_level as lvl %}
                                     {% if lvl %}{{ lvl }}{% endif %}
                                 {% endwith %}
-                            {% endifequal %}
+                            {% endif %}
                         </td>
                         <td>{{ ref.relationship.name }}</td>
                         <td>{{ ref.is_downref|default:'' }}</td>