# Allowing certain HTML tags

**URL:** <https://www.ruby-forum.com/t/allowing-certain-html-tags/89599>\
**Category:** Rails\
**Created:** [March 21, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/allowing-certain-html-tags/89599 "2007-03-21T14:43:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [March 21, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/allowing-certain-html-tags/89599/1 "2007-03-21T14:43:29Z")

</div>

I’m looking for the right combination of view helpers to get the  
following:

-carriage returns converted to   
  
-any URL’s converted to links  
-allow for embed tags  
-sanitize any other tags or scripts

I know its kind of demanding 🙂 Any help is appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![blinking\_bear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Post date:** [March 21, 2007, 3:48pm UTC](https://www.ruby-forum.com/t/allowing-certain-html-tags/89599/2 "2007-03-21T15:48:37Z")

</div>

> -carriage returns converted to   
>   
> Simple gsub()

> -any URL’s converted to links  
> gsub() with regular expression

> -allow for embed tags  
> -sanitize any other tags or scripts  
> white\_list plugin  
> ([http://svn.techno-weenie.net/projects/plugins/white\_list/](http://svn.techno-weenie.net/projects/plugins/white_list/))

Hope this helps.

–  
Zack C.  
[http://depixelate.com](http://depixelate.com)
