diff --git a/pytest_html/plugin.py b/pytest_html/plugin.py index 8cd72b63..0f52fea2 100644 --- a/pytest_html/plugin.py +++ b/pytest_html/plugin.py @@ -319,7 +319,12 @@ def _make_media_html_div( href = src = self.create_asset( content, extra_index, test_index, extra.get("extension"), "wb" ) - html_div = html.a(class_=base_extra_class, target="_blank", href=href) + html_div = html.a( + raw(base_extra_string.format(href)), + class_=base_extra_class, + target="_blank", + href=href + ) return html_div def _append_image(self, extra, extra_index, test_index):