File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ class ContentNotFoundException(Exception):
235235class BaseStaticContentTemplateView (TemplateView ):
236236 template_name = "adoc_content.html"
237237 allowed_db_save_types = {"text/asciidoc" }
238+ html_content_types = {"text/html" , "text/html; charset=utf-8" }
238239
239240 def get (self , request , * args , ** kwargs ):
240241 """Return static content that originates in S3.
@@ -573,7 +574,8 @@ def get_content(self, content_path):
573574 logger .info (f"get_content_from_s3_view_no_valid_object { content_path = } " )
574575 raise ContentNotFoundException ("Content not found" )
575576
576- result ["redirect" ] = get_meta_redirect_from_html (result ["content" ])
577+ if result ["content_type" ] in self .html_content_types :
578+ result ["redirect" ] = get_meta_redirect_from_html (result ["content" ])
577579
578580 return result
579581
You can’t perform that action at this time.
0 commit comments