# Input '\>' character into html builder array

**URL:** <https://www.ruby-forum.com/t/input-character-into-html-builder-array/157651>\
**Category:** Rails\
**Created:** [January 14, 2009, 4:51am UTC](https://www.ruby-forum.com/t/input-character-into-html-builder-array/157651 "2009-01-14T04:51:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [January 14, 2009, 4:51am UTC](https://www.ruby-forum.com/t/input-character-into-html-builder-array/157651/1 "2009-01-14T04:51:11Z")

</div>

I’m using an html calendar builder and am getting a compile error when  
trying to input a close to some ruby code into the cell\_input:  
cell\_text \<\< “%\>”, it seems that it is choking on the closing \> sign.  
Is there any way to escape this?

I could really use some help here, not sure how to search for  
information on this. Thanks.  
This is the line that I am having issues with:

cell\_text \<\< “%\>”

This is the error output:

ActionView::TemplateError (compile error  
syntax error, unexpected $undefined, expecting kEND  
…\<\< “).to\_s); _erbout.concat “”\n \n \n\n\n [cell\_text,…  
^  
syntax error, unexpected $end, expecting ‘)’) on line #37 of users/  
 calendar\_large\_data.rhtml:  
34:  
35: cell\_text \<\< "\<%= "  
36: cell\_text \<\< "javascript\_tag "new Popup('test\_popup#{@day}’,  
'test\_popup\_link_#{@day}’,{position:‘25%,30%’, trigger:‘click’,  
modal:true})”"  
37: cell\_text \<\< “%\>”  
38:  
39:  
40:

I was having a similar compile issue with inputting double quotes into  
the cell\_text array and was able to use \ to avoid any problems:

cell\_text \<\< “\<div id=“test\_popup\_#{@day}” class=“cal\_popup” style=  
“display:none”\>”

---

<div class="post-metadata">

**Author:** ![david](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@david](https://www.ruby-forum.com/u/david)\
**Post date:** [January 14, 2009, 2:49pm UTC](https://www.ruby-forum.com/t/input-character-into-html-builder-array/157651/2 "2009-01-14T14:49:12Z")

</div>

On 14 Jan 2009, at 03:50, David wrote:

> cell\_text \<\< “%\>”

\<% and %\> are special in erb. You need to use \<%% and %%\> to include  
literal \<% and %\>  
Or avoid the whole lot by putting it in a helper.

Fred
