From 0baaf12de350b177196f9e64b4f1c46250045288 Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Thu, 26 Jan 2017 10:46:58 +0100 Subject: [PATCH] Re-display images & checkboxes in PDF reports Closes SCI-953. --- app/helpers/input_sanitize_helper.rb | 10 +++++++--- app/views/reports/report.pdf.erb | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/helpers/input_sanitize_helper.rb b/app/helpers/input_sanitize_helper.rb index 3137ab392..35b56be3d 100644 --- a/app/helpers/input_sanitize_helper.rb +++ b/app/helpers/input_sanitize_helper.rb @@ -1,9 +1,13 @@ module InputSanitizeHelper - def sanitize_input(text) + def sanitize_input( + text, + tags = [], + attributes = [] + ) ActionController::Base.helpers.sanitize( text, - tags: Constants::WHITELISTED_TAGS, - attributes: Constants::WHITELISTED_ATTRIBUTES + tags: Constants::WHITELISTED_TAGS + tags, + attributes: Constants::WHITELISTED_ATTRIBUTES + attributes ) end diff --git a/app/views/reports/report.pdf.erb b/app/views/reports/report.pdf.erb index 8ed7c223b..fb6e33ea7 100644 --- a/app/views/reports/report.pdf.erb +++ b/app/views/reports/report.pdf.erb @@ -9,7 +9,8 @@