Sanitize rendered markdown

This commit is contained in:
Jose Farias
2024-11-29 18:00:50 -06:00
parent 8a5b672adb
commit 2b9c4d9b71
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
<% end %>
</div>
<div class="comment__body txt-align-start">
<%= comment.body_html %>
<%= sanitize comment.body_html %>
</div>
</div>
<% end %>
+3
View File
@@ -0,0 +1,3 @@
Rails.application.config.after_initialize do
Rails::HTML5::SafeListSanitizer.allowed_tags.merge(%w[ table tr td th thead tbody details summary ])
end