RJS template eating encoding

I was previously doing an update via .rhtml templates creating an AJAX
:evaluate_remote_response. I use UTF-8 in my pages, and my app
requires that I be able to, say, put Japanese characters in.

The problem is that when I switched this over to an RJS template it
started eating the encoding. I now get garbage characters where before
I got the correct ones.

The code for the RHTML:

<%= update_element_function(
“front”, :content => simple_format( h(@card.front_side))) %>
<%= update_element_function(
“back”, :content => simple_format( h(@card.back_side))) %>

and for RJS:

page.replace_html ‘front’, simple_format( h( @card.front_side ) )
page.replace_html ‘back’, simple_format( h( @card.back_side ) )

If I go to the action manually and check, in the RHTML version it has
the correct characters; in the RJS version it has the \312\342 escape

Any way to turn off the escaping?


I want to launch a rails application from a regular .html page. It
works just fine with apache on my web host provider’s server but I
can’t seem to figure out how to get the index.html to show up while
I’m running lighttpd and using http://localhost:3000/welcome.html/

Seems like a dumb question, but any help would be appreciated.


http://localhost:3000/welcome.html/ points to a directory called

I guess I am unclear on what you mean by “Launch a rails application
from a regular .html page”

~ Ben

On 3/15/06, Denise E. [email protected] wrote:

Rails mailing list
[email protected]

Ben R.


What is mean is my ordinary everyday .html file has a form with a
submit button and on the submit button is the url for a rails
controller. If the user clicks the button, the rails controller
evaluates values from the post and redirects him/her to the right
page within the app. If the user never clicks the button, the rails
app is never launched. Is that more clear?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs