ruby on rails - Only allow links to display from user input -
My Rail App allows users to post comments that are displayed with simple_format. Currently all HTML is saved, but I want users to be able to post links in their comments. While discussing the Rails_autolink gem I should be able to do this, but I do not know that this is the best / safest way
auto_link was removed from the rail and called gem
This is an extraction of the rule from the
auto_linkmethod from Rail: Removed theauto_linkmethod removed from Rail in Railway 3.1. This gem means reducing the gap for people who migrate.
How should I show only the links in my comments?
Tags and attributes (only the mentioned tags and attributes are allowed, nothing else).
& lt;% = sanitize @ article.body, Tags:% w (a)%> is here.
Comments
Post a Comment