From c4d3f2aa3e373c89fc50974311b2defbdadd2d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Wed, 11 Sep 2024 14:58:09 +0200 Subject: [PATCH] Inline displaying of HTML files --- app/controllers/dmsf_files_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/dmsf_files_controller.rb b/app/controllers/dmsf_files_controller.rb index 0c24f073..3918f79f 100644 --- a/app/controllers/dmsf_files_controller.rb +++ b/app/controllers/dmsf_files_controller.rb @@ -83,7 +83,7 @@ def view send_file pdf_preview, filename: "#{basename}.pdf", type: 'application/pdf', disposition: 'inline' # Text preview elsif !api_request? && params[:download].blank? && (@file.size <= Setting.file_max_size_displayed.to_i.kilobyte) && - (@file.text? || @file.markdown? || @file.textile?) + (@file.text? || @file.markdown? || @file.textile?) && !@file.html? @content = File.read(@revision.disk_file, mode: 'rb') render action: 'document' # Offer the file for download