[Boulder-Denver Ruby Group] can html content be filtered before it is sent back to the client?

ara.t.howard ara.t.howard at gmail.com
Fri Jun 1 17:59:56 EDT 2007


On Jun 1, 2007, at 1:01 PM, Ryan Grow wrote:

> Hi,
>
> I have a requirement to remove some whitespace and newlines from  
> html generated by ruby templates, before it goes back to the client.
>
> It seems to be pretty hard to control placement of newlines at the  
> template level. Is there a "filter hook" of some sort that can  
> remove unwanted characters after the html has been created but  
> before its passed back to the web server?

this can be configured in apache quite easily.  to test our theory  
you could always do

   buf = render_to_string ...
   transform buf
   render :text => buf

which is down, dirty, and done today.

-a
--
we can deny everything, except that we have the possibility of being  
better. simply reflect on that.
h.h. the 14th dalai lama



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/bdrg-members/attachments/20070601/802db989/attachment.html 


More information about the Bdrg-members mailing list