RecaptchaOptions escaped by XmlMarkup
Reported by martoche | November 19th, 2008 @ 04:30 AM
recaptcha.rb, line 20
The text! method escapes the passed string resulting in an invalid JavaScript.
I've replaced line 20 by: xhtml.script(:type => "text/javascript"){ xhtml << "var RecaptchaOptions = #{options[:display].to_json};\n"}
and it works fine with my Rails 2.2.1 application.
Thanks for your plugin! Martin
Comments and changes to this ticket
-
Alex December 8th, 2008 @ 03:19 PM
I just ran into this today after updating hpricot :) Looks like text! escape only showing up when you have fast_xs available on your system. BTW new version of hpricot installs it.
rails/activesupport/lib/active_support/core_ext/string/xchar.rb
trying to load fast_xs and uses it if it is available.
I think the fix described in a prior comment is a right way to go, just figured I will give a bit more description on how to reproduce the bug.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A rails plugin that adds helpers for the ReCAPTCHA API.