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_link method from Rail: Removed the auto_link method 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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -