# Commentable behavior

**URL:** <https://www.ruby-forum.com/t/commentable-behavior/69035>\
**Category:** Radiant CMS\
**Created:** [September 18, 2006, 10:15am UTC](https://www.ruby-forum.com/t/commentable-behavior/69035 "2006-09-18T10:15:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wolfgang\_Wopperer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/3be4f8/32.png) [@Wolfgang\_Wopperer](https://www.ruby-forum.com/u/Wolfgang_Wopperer)\
**Post date:** [September 18, 2006, 10:15am UTC](https://www.ruby-forum.com/t/commentable-behavior/69035/1 "2006-09-18T10:15:52Z")

</div>

Using the Commentable behavior on our new website ([www.mindmatters.de](http://www.mindmatters.de)),  
I found that the behavior escapes not only HTML tags, but also quotes in  
comments â?? which means that Textile receives them as “"” and wonâ??t  
be able to render links submitted in Textile syntax. Any idea how to  
avoid this?

Thanks,  
Wolfgang

---

<div class="post-metadata">

**Author:** ![Wolfgang\_Wopperer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/3be4f8/32.png) [@Wolfgang\_Wopperer](https://www.ruby-forum.com/u/Wolfgang_Wopperer)\
**Post date:** [September 18, 2006, 1:59pm UTC](https://www.ruby-forum.com/t/commentable-behavior/69035/2 "2006-09-18T13:59:38Z")

</div>

Wolfgang Wopperer wrote:

> Using the Commentable behavior on our new website ([www.mindmatters.de](http://www.mindmatters.de)),  
> I found that the behavior escapes not only HTML tags, but also quotes in  
> comments â?? which means that Textile receives them as “"” and wonâ??t  
> be able to render links submitted in Textile syntax. Any idea how to  
> avoid this?
> 
> Thanks,  
> Wolfgang

Wolfgang,

I took the “quick-and-dirty” route on that and used CGI.escape\_html. A  
more flexible parser is probably in order. Maybe one that only escapes  
the \<\> ? That would be easy.

Sean C.  
[seancribbs.com](http://seancribbs.com)

---

<div class="post-metadata">

**Author:** ![Wolfgang\_Wopperer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/3be4f8/32.png) [@Wolfgang\_Wopperer](https://www.ruby-forum.com/u/Wolfgang_Wopperer)\
**Post date:** [September 18, 2006, 11:03pm UTC](https://www.ruby-forum.com/t/commentable-behavior/69035/3 "2006-09-18T23:03:59Z")

</div>

Yeah, that sounds like the right thing to do. I will see if I get it  
changed in the next couple of days - if I’m the first to change it, I’ll  
post the changed code here.

Thanks,  
Wolfgang
