diff --git a/AUTHORS.txt b/AUTHORS.txt
index 68a925bf0..efdcdf1b5 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -117,6 +117,7 @@
 * `Roman Faizullin <https://github.com/faizrr>`_
 * `Roman Imankulov <https://github.com/imankulov>`_
 * `Santiago Pestarini <https://github.com/quijot>`_
+* `Santiago Fraire Willemoes <https://github.com/Woile>`_
 * `Sean Pue <https://github.com/seanpue>`_
 * `Simon van der Veldt <https://github.com/simonvanderveldt>`_
 * `Stefan Näwe <https://github.com/snaewe>`_
diff --git a/CHANGES.txt b/CHANGES.txt
index b597b4d52..3809d9620 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,11 @@
+New in master
+=============
+
+Bugfixes
+--------
+
+* Find substring in string instead of using `contains` in utils
+
 New in v8.2.2
 =============
 
diff --git a/nikola/utils.py b/nikola/utils.py
index c735632c3..ed91e7c41 100644
--- a/nikola/utils.py
+++ b/nikola/utils.py
@@ -1714,7 +1714,7 @@ _original_find_formatter_class = pygments.formatters.find_formatter_class
 
 def nikola_find_formatter_class(alias):
     """Nikola-specific version of find_formatter_class."""
-    if alias.lower().contains('html'):
+    if "html" in alias.lower():
         return NikolaPygmentsHTML
     return _original_find_formatter_class(alias)
 

diff --git a/tests/test_utils.py b/tests/test_utils.py
index d92ae9c04..764eec2c2 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -14,11 +14,13 @@ from nikola.post import get_meta
 from nikola.utils import (
     TemplateHookRegistry,
     TranslatableSetting,
+    NikolaPygmentsHTML,
     demote_headers,
     get_asset_path,
     get_crumbs,
     get_theme_chain,
     get_translation_candidate,
+    nikola_find_formatter_class,
     write_metadata,
     bool_from_meta,
     parselinenos
@@ -639,3 +641,7 @@ def test_parselinenos():
         parselinenos('-', 10)
     with pytest.raises(ValueError):
         parselinenos('3-1', 10)
+
+
+def test_nikola_find_formatter_class_returns_pygments_class():
+    assert NikolaPygmentsHTML == nikola_find_formatter_class("html")

Cannot build, AttributeError error
<!--
Before creating an issue:
* make sure you are using an up-to-date version of Nikola
* search for existing issues that might be related

Make sure to:
* provide information about your environment (below)
* include all the output you get, and any other information related to your problem

Nikola v7.6.4, as provided by Ubuntu, is NOT SUPPORTED.
If you are using this version, you should upgrade: https://getnikola.com/getting-started.html
-->

### Environment

**Python Version:** 3.10

**Nikola Version:** 8.2.2

**Operating System:** MacOS

### Description:

I get the following error:

```python
nikola_find_formatter_class
    if alias.lower().contains('html'):
AttributeError: 'str' object has no attribute 'contains'
```
See gh action: https://github.com/Woile/woile.github.io/runs/6389001428?check_suite_focus=true

Python does not have a `contains` method for strings, I'm submitting a PR now
tests/test_utils.py::test_nikola_find_formatter_class_returns_pygments_class
tests/test_utils.py::test_getting_metadata_from_content tests/test_utils.py::test_get_title_from_fname tests/test_utils.py::test_use_filename_as_slug_fallback tests/test_utils.py::test_extracting_metadata_from_filename[True-Dub tests/test_utils.py::test_extracting_metadata_from_filename[False-dub_dub_title] tests/test_utils.py::test_get_meta_slug_only_from_filename tests/test_utils.py::test_demoting_headers[by tests/test_utils.py::test_TranslatableSettingsTest_with_string_input tests/test_utils.py::test_TranslatableSetting_with_dict_input tests/test_utils.py::test_TranslatableSetting_with_language_change tests/test_utils.py::test_get_asset_path[assets/css/nikola_rst.css-files_folders0-nikola/data/themes/base/assets/css/nikola_rst.css] tests/test_utils.py::test_get_asset_path[assets/css/theme.css-files_folders1-nikola/data/themes/bootstrap4/assets/css/theme.css] tests/test_utils.py::test_get_asset_path[nikola.py-files_folders2-nikola/nikola.py] tests/test_utils.py::test_get_asset_path[nikola/nikola.py-files_folders3-nikola/nikola.py] tests/test_utils.py::test_get_asset_path[nikola.py-files_folders4-None] tests/test_utils.py::test_get_crumbs[galleries-False-expected_crumbs0] tests/test_utils.py::test_get_crumbs[galleries/demo-False-expected_crumbs1] tests/test_utils.py::test_get_crumbs[listings/foo/bar-True-expected_crumbs2] tests/test_utils.py::test_get_translation_candidate[{path}.{lang}.{ext}-*.rst-es-*.es.rst] tests/test_utils.py::test_get_translation_candidate[{path}.{lang}.{ext}-fancy.post.rst-es-fancy.post.es.rst] tests/test_utils.py::test_get_translation_candidate[{path}.{lang}.{ext}-*.es.rst-es-*.es.rst] tests/test_utils.py::test_get_translation_candidate[{path}.{lang}.{ext}-*.es.rst-en-*.rst] tests/test_utils.py::test_get_translation_candidate[{path}.{lang}.{ext}-cache/posts/fancy.post.es.html-en-cache/posts/fancy.post.html] tests/test_utils.py::test_get_translation_candidate[{path}.{lang}.{ext}-cache/posts/fancy.post.html-es-cache/posts/fancy.post.es.html] tests/test_utils.py::test_get_translation_candidate[{path}.{lang}.{ext}-cache/pages/charts.html-es-cache/pages/charts.es.html] tests/test_utils.py::test_get_translation_candidate[{path}.{lang}.{ext}-cache/pages/charts.html-en-cache/pages/charts.html] tests/test_utils.py::test_get_translation_candidate[{path}.{ext}.{lang}-*.rst-es-*.rst.es] tests/test_utils.py::test_get_translation_candidate[{path}.{ext}.{lang}-*.rst.es-es-*.rst.es] tests/test_utils.py::test_get_translation_candidate[{path}.{ext}.{lang}-*.rst.es-en-*.rst] tests/test_utils.py::test_get_translation_candidate[{path}.{ext}.{lang}-cache/posts/fancy.post.html.es-en-cache/posts/fancy.post.html] tests/test_utils.py::test_get_translation_candidate[{path}.{ext}.{lang}-cache/posts/fancy.post.html-es-cache/posts/fancy.post.html.es] tests/test_utils.py::test_TemplateHookRegistry tests/test_utils.py::test_sitemap_get_base_path[http://some.site-/] tests/test_utils.py::test_sitemap_get_base_path[http://some.site/-/] tests/test_utils.py::test_sitemap_get_base_path[http://some.site/some/sub-path-/some/sub-path/] tests/test_utils.py::test_sitemap_get_base_path[http://some.site/some/sub-path/-/some/sub-path/] tests/test_utils.py::test_write_metadata_with_formats[nikola-.. tests/test_utils.py::test_write_metadata_comment_wrap[False-.. tests/test_utils.py::test_write_metadata_comment_wrap[True-<!--\n.. tests/test_utils.py::test_write_metadata_comment_wrap[wrap2-111\n.. tests/test_utils.py::test_write_metadata_compiler[rest_docinfo-expected_results0] tests/test_utils.py::test_write_metadata_compiler[markdown_meta-expected_results1] tests/test_utils.py::test_write_metadata_pelican_detection[rest-==\nxx\n==\n\n] tests/test_utils.py::test_write_metadata_pelican_detection[markdown-title: tests/test_utils.py::test_write_metadata_pelican_detection[html-.. tests/test_utils.py::test_write_metadata_pelican_detection_default tests/test_utils.py::test_write_metadata_default tests/test_utils.py::test_write_metadata_fallbacks[foo] tests/test_utils.py::test_write_metadata_fallbacks[filename_regex] tests/test_utils.py::test_bool_from_meta[true-True] tests/test_utils.py::test_bool_from_meta[True-True0] tests/test_utils.py::test_bool_from_meta[TRUE-True] tests/test_utils.py::test_bool_from_meta[yes-True] tests/test_utils.py::test_bool_from_meta[Yes-True] tests/test_utils.py::test_bool_from_meta[YES-True] tests/test_utils.py::test_bool_from_meta[false-False] tests/test_utils.py::test_bool_from_meta[False-False0] tests/test_utils.py::test_bool_from_meta[FALSE-False] tests/test_utils.py::test_bool_from_meta[no-False] tests/test_utils.py::test_bool_from_meta[No-False] tests/test_utils.py::test_bool_from_meta[NO-False] tests/test_utils.py::test_bool_from_meta[1-True0] tests/test_utils.py::test_bool_from_meta[1-True1] tests/test_utils.py::test_bool_from_meta[0-False0] tests/test_utils.py::test_bool_from_meta[0-False1] tests/test_utils.py::test_bool_from_meta[0-False2] tests/test_utils.py::test_bool_from_meta[True-True1] tests/test_utils.py::test_bool_from_meta[False-False1] tests/test_utils.py::test_bool_from_meta[unknown-F] tests/test_utils.py::test_bool_from_meta[None-B] tests/test_utils.py::test_bool_from_meta[-B] tests/test_utils.py::test_parselinenos