diff --git a/docs/_theme/search.html b/docs/_theme/search.html
index 3174129b1c..8da2bd997a 100644
--- a/docs/_theme/search.html
+++ b/docs/_theme/search.html
@@ -13,6 +13,7 @@
{%- block scripts %}
{{ super() }}
+
{%- endblock %}
{% block footer %}
diff --git a/requirements_docs.txt b/requirements_docs.txt
index c227c0d845..778267ae9c 100644
--- a/requirements_docs.txt
+++ b/requirements_docs.txt
@@ -1,6 +1,6 @@
docutils>=0.15
pygments>=2.6
-sphinx>=3.0,!=3.2.0
+sphinx>=4.0, <5.0
sphinx_rtd_theme>=0.5
nbsphinx>=0.5
datatable