From 3cddab7276d26cb9b44dabe9d83b35053e661afa Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Wed, 17 Dec 2014 16:44:34 +0100 Subject: [PATCH] extend whitelist sanitze --- app/controllers/themen_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/themen_controller.rb b/app/controllers/themen_controller.rb index 5f5024a..b3d1ede 100644 --- a/app/controllers/themen_controller.rb +++ b/app/controllers/themen_controller.rb @@ -32,7 +32,7 @@ class ThemenController < ApplicationController Sanitize.node!(node,{:elements=>["span"],:attributes=>{"span"=>["class","style"]},:css=>{:properties=>["color"]}}) {:node_whitelist=>[node]} end - @thema.text = Sanitize.fragment(@thema.text, {:elements=>['table','tr','td','p','h3','h4','a','th','img','ul','li','i','b','em'],:attributes=>{'p'=>['class'],'table'=>['class'],'a'=>['href','data'],'img'=>['src','width','height'],:all=>['class']},:css=>{:properties=>['float']},:transformers=>[trans_icons]}) + @thema.text = Sanitize.fragment(@thema.text, {:elements=>['table','tr','td','p','h1','h2','h3','h4','h5','a','th','img','ul','li','i','b','em','pre','code'],:attributes=>{'p'=>['class'],'table'=>['class'],'a'=>['href','data'],'img'=>['src','width','height'],:all=>['class']},:css=>{:properties=>['float']},:transformers=>[trans_icons]}) # # # # # # #