From 85d9650903329d811a2a69ee7965c192ff5826b6 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Thu, 26 Jan 2023 17:42:32 +0100 Subject: [PATCH] Allow `img` (and its attributes) to be displayed in the shopfront --- app/services/content_sanitizer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/content_sanitizer.rb b/app/services/content_sanitizer.rb index 66db2879fd..73d98fbb6c 100644 --- a/app/services/content_sanitizer.rb +++ b/app/services/content_sanitizer.rb @@ -5,8 +5,8 @@ class ContentSanitizer include ActionView::Helpers::SanitizeHelper - ALLOWED_TAGS = ["p", "b", "strong", "em", "i", "a", "u"].freeze - ALLOWED_ATTRIBUTES = ["href", "target"].freeze + ALLOWED_TAGS = ["p", "b", "strong", "em", "i", "a", "u", "img"].freeze + ALLOWED_ATTRIBUTES = ["href", "target", "src", "alt"].freeze FILTERED_CHARACTERS = { "&" => "&", "&" => "&",