I''d like to use render :text => h(''this text should be html escaped so that things like <hi> are still printed!'') How do I do this? I assume I just need to require a file in the controller, but I''m not sure what -- Posted via http://www.ruby-forum.com/.
Do I need to specify more information? Is something I wrote unclear? I can''t beleive that this is a stumper! lstrecv wrote:> I''d like to use render :text => h(''this text should be html escaped so > that things like <hi> are still printed!'') > > How do I do this? I assume I just need to require a file in the > controller, but I''m not sure what-- Posted via http://www.ruby-forum.com/.
ara.t.howard-32lpuo7BZBA@public.gmane.org
2005-Dec-09 04:05 UTC
Re: Re: Rendering text in a controller, converting to html
On Fri, 9 Dec 2005, List Recv wrote:> Do I need to specify more information? > Is something I wrote unclear? > > I can''t beleive that this is a stumper! > > lstrecv wrote: >> I''d like to use render :text => h(''this text should be html escaped so >> that things like <hi> are still printed!'') >> >> How do I do this? I assume I just need to require a file in the >> controller, but I''m not sure whatrequire ''cgi'' CGI::escapeHTML ''<h1> foobar </h1>'' will work... -a -- ==============================================================================| ara [dot] t [dot] howard [at] noaa [dot] gov | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara ===============================================================================