On Fri, Jan 2, 2009 at 5:08 PM, Jonathan Rochkind <[email protected]> wrote:
> I knew that a URL in xHTML required ampersands to be escaped like that, > even in an <a href>. I did not know that a URL in standard (non-x)HTML > required that. Really? Okay. <http://www.w3.org/TR/html401/charset.html#h-5.3.2> > But it's confusing in part because an ERB template isn't _only_ used for > HTML. It can theoretically be used for creating any format, including > plain text, right? And someone using an ERB template to create (eg) > plain text is going to get tripped up there. Interesting point -- I haven't tried generating any text/plain from an ERB template. > An ERB template was generating XML. It took the result of a url_for > call, and put it through an XML-escaping routine, figuring that anything > that was being put in XML should be put through an XML escaping routine. > > So we wound up with XML who's source looked like > <some_url>/controller/action?foo=foo&amp;bar=bar > > Is this correct or not? I'd say not :-) Try eliminating the extra escaping routine and see what happens... HTH, -- Hassan Schroeder ------------------------ [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

