views:

58

answers:

1

Use of rails 3 recaptcha. In view _form.html.erb insert <%= recaptcha_tags %> But when viewing the page in the browser receives

&lt;script type=&quot;text/javascript&quot; src=&quot;http://api.recaptcha.net/challenge?k=**&amp;amp;error=expression&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;

As I understand it is not rendered in the browser. Why '<' instead of < ?

A: 

Try <%= raw recaptcha_tags %>. Or use html_safe inside helper. Explanation here: http://asciicasts.com/episodes/204-xss-protection-in-rails-3

gertas
Thank you gertas
dream-x