Escape Entire View output?

What is the easiest way to escape an entire (or partial) view output? I
have an entire section of output that needs to be escaped to be inserted
into an RSS description section, and am looking for the easiest way to
accomplish this.

Thanks.

Jim J. wrote:

What is the easiest way to escape an entire (or partial) view output? I
have an entire section of output that needs to be escaped to be inserted
into an RSS description section, and am looking for the easiest way to
accomplish this.

Thanks.

Maybe (just off the top of my head)
h(render_to_string render_options)
Fred

Jim J. <[email protected]…> writes:

What is the easiest way to escape an entire (or partial) view output?
I have an entire section of output that needs to be escaped to be
inserted into an RSS description section, and am looking for the
easiest way to accomplish this.

It sounds like you just want to use a CDATA section. Markup inside an
XML
CDATA section isn’t parsed, take a look at the docs for however you’re
generating the XML

Gareth

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