On Oct 10, 3:42 pm, Mario Gr
<li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> Hi,
>
> I''m outputting some database objects as static JSON files using a
stand
> along ruby script.rb, that other could run outside of my rails app. When
> I use this script, the output replaces "&" with
"\u0026." If I use the
> same code to output my JSON files in console, it outputs fine.
>
> I imagine there is some gem or something I''m not including in my
> script.rb that would resolve this. Thoughts?
If you''re using ActiveSupport''s json stuff then
ActiveSupport::JSON::Encoding.escape_html_entities_in_json controls
this (although
\u0026 is perfectly u legal way of representing &)
Fred>
> Thanks!
> --
> Posted viahttp://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.