From: Simon Strandgaard Date: 2004-03-25T13:19:36+09:00 Subject: Re: Newbie Q: Lowercase CGI output On Thu, 25 Mar 2004 13:00:05 +0900, Sven Schott wrote: > I know this might be simple but I haven't found a decent(simple Ruby > way) of doing this. > > The CGI module outputs all the html tags in upper case. For my own > conceited reasons( and I heard this was the preferred method), I would > like the tags to be in lower case. The pretty method lines up > everything nicely but does nothing else. I have tried appending > downcase to the string passed to pretty: > You will have to do downcase ala this (untested).. perhaps more downcasing is necessary ? require 'cgi' class CGI module TagMaker def nn_element_def(element) <<-END.gsub(/element\.downcase/n, element.downcase).gsub(/element\.upcase/n, element.upcase) "" + if block_given? yield.to_s else "" end + "" END end end # module TagMaker end # class CGI -- Simon Strandgaard