How to safely sanitize input from TinyMCE in ruby? -
i added tinymce small cms built in rails. i've been using redcloth before style user generated articles.
since started using tinymce, allow users embed video (from youtube ex) blog posts.
i'm using follow helper in views:
sanitize(text, :tags => %w(a object p param h1 h2 h3 h4 h5 h6 br hr ul li img), :attributes => %w(href name src type value width height data) )
is safe? or should not allow tags? if so, tags can allow? how can test make sure?
this still in staging.
thanks
deb
you allowed use tags want using valid_elements configuration option, check out default setting can expand. may have @ custom_elements option.
Comments
Post a Comment