# Using fckeditor under rails

**URL:** <https://www.ruby-forum.com/t/using-fckeditor-under-rails/105329>\
**Category:** Rails\
**Created:** [May 28, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/using-fckeditor-under-rails/105329 "2007-05-28T22:06:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas\_Carvalho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d6d6ee/32.png) [@Lucas\_Carvalho](https://www.ruby-forum.com/u/Lucas_Carvalho)\
**Post date:** [May 28, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/using-fckeditor-under-rails/105329/1 "2007-05-28T22:06:12Z")

</div>

Hello all,  
I am using fckeditor to write texts, but the problem is: the user can  
add  
JavaScripts commands.  
But when I am showing the content of record, I need to display only  
the  
HTML and deny the JavaScript commands.  
So I can not use the h tag. Because the h tag deny both (HTML and JS).  
How can I deny only the JS commands and display the HTML.

Thank you.

–  
Lucas Carvalho

---

<div class="post-metadata">

**Author:** ![Lucas\_Carvalho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d6d6ee/32.png) [@Lucas\_Carvalho](https://www.ruby-forum.com/u/Lucas_Carvalho)\
**Post date:** [May 29, 2007, 3:01am UTC](https://www.ruby-forum.com/t/using-fckeditor-under-rails/105329/2 "2007-05-29T03:01:45Z")

</div>

I believe sanatize() will do the trick

---

<div class="post-metadata">

**Author:** ![Lucas\_Carvalho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d6d6ee/32.png) [@Lucas\_Carvalho](https://www.ruby-forum.com/u/Lucas_Carvalho)\
**Post date:** [May 29, 2007, 3:02am UTC](https://www.ruby-forum.com/t/using-fckeditor-under-rails/105329/3 "2007-05-29T03:02:59Z")

</div>

Only if you spell it right thought: sanitize()

Chad wrote:

> I believe sanatize() will do the trick
