Phlip
2006-Dec-20 01:21 UTC
Builder::XmlMarkup should escape "quotes" in attributes, right?
Railsers: What''s with Builder::XmlMarkup doesn''t escape double quotes in tag attributes? Ogle: def test_xml_markup x = Builder::XmlMarkup.new x.span :id => ''I be a "quoted" string'' assert_not_equal ''<span id="I be a "quoted" string"/>'', x.target! end That fails its assertion, and would also fail a check for well-formed XML. I was relying on XmlMarkup to detect _how_ to mark quotes up, so I wouldn''t need to research it myself. " is supported everywhere, right? I''m going to need to get arbitrarily nested here (using the XmlMarkup to build XHTML-style HTML that transports arbitrarily complex strings), so I need perfectly balanced escapes and de-escapes here. -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!! --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---