diff --git a/scipost_django/scipost/templates/scipost/portal/_hx_publications.html b/scipost_django/scipost/templates/scipost/portal/_hx_publications.html
index ecf18fd819897e065753488bc54d9d227c45f0d4..f4889adda477ab8ae90e7a69ef9b5bbf6b30e460 100644
--- a/scipost_django/scipost/templates/scipost/portal/_hx_publications.html
+++ b/scipost_django/scipost/templates/scipost/portal/_hx_publications.html
@@ -65,4 +65,5 @@
     document.getElementById("id_proceedings").value = null
     }
     })
+  </script>
 {% endblock footer_script %}
diff --git a/scipost_django/scipost/templates/scipost/portal/_hx_submissions_base.html b/scipost_django/scipost/templates/scipost/portal/_hx_submissions_base.html
index 264eb6b3344aa256a199b4a473871be1b0415eea..b3bf9ec9ce2c0b3fb9070439a5b2bb62b292e667 100644
--- a/scipost_django/scipost/templates/scipost/portal/_hx_submissions_base.html
+++ b/scipost_django/scipost/templates/scipost/portal/_hx_submissions_base.html
@@ -63,4 +63,5 @@
     document.getElementById("id_proceedings").value = null
     }
     })
+  </script>
 {% endblock footer_script %}