Let's go with to_s because I think that attempts to select the best option
and is therefore safest. We'll keep an eye on it after the release and see
if it needs any more special treatment.

...as I mentioned in the comment, be sure to set the encoding when loading.
I'm fine with defaulting to, or even forcing UTF-8. We can take  a position
here of recommending the best choice...there is little reason, if any, to
choose something else. Even Ruby 2.0 defaults to UTF-8 and everyone I've
heard on the matter seem to agree it's a no brainer.

--
Sent from my CyanogenMod-powered
Android device, an open platform for
carriers, developers and consumers.
On Mar 7, 2013 6:03 AM, "Jason Porter" <notifications@github.com> wrote:

> In lib/awestruct/context_helper.rb:
>
> >        else
> > -        doc.to_s.tap do |d|
> > +        doc.to_xhtml.tap do |d|
>
> Yep, seeing that now. to_s / to_html doesn't mess with scripts, should we
> use that, or are there other cases where things are messed up?
> … <#13d433b1ea90a366_>
> On Wed, Mar 6, 2013 at 8:01 PM, Dan Allen <notifications@github.com>
> wrote: In lib/awestruct/context_helper.rb: > else > - doc.to_s.tap do |d| >
> + doc.to_xhtml.tap do |d| Create a script tag, wrap the contents in CDATA
> (with the appropriate JavaScript comments) and watch Nokogiri just wreck
> the output when using to_xhtml. — Reply to this email directly or view it
> on GitHub<https://github.com/awestruct/awestruct/pull/221/files#r3274239>
> .
>  -- Jason Porter http://en.gravatar.com/lightguardjp
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/awestruct/awestruct/pull/221/files#r3275031>
> .
>