This project is archived and is in readonly mode.
AtomFeedBuilder renders not valid xml when using options[:xml]
Reported by Wiktor Gworek | February 1st, 2009 @ 11:47 AM | in 2.x
When using atom_feed in standalone app:
atom_feed({ :id => 1, :root_url => 'root_url',
:language => 'pl_PL', :url => 'some_url', :xml =>
Builder::XmlMarkup.new}) do |feed| ...
renders:
<?xml version="1.0"
encoding="UTF-8"?><feed<to_s/> xml="<?xml
version="1.0"
encoding="UTF-8"?><inspect/><feed<to_s/>"
xml:lang="pl_PL" xmlns="http://www.w3.org/2005/Atom">
which is not valid. This is due line 144 in atom_feed_helper.rb:
feed_opts.merge!(options).reject!{|k,v|
!k.to_s.match(/^xml/)}
It doesn't rejectes (but should)
options[:xml].
Comments and changes to this ticket
-
CancelProfileIsBroken August 4th, 2009 @ 06:17 PM
- Tag set to bugmash
-
chucknelson August 8th, 2009 @ 11:21 PM
-1 I don't know how important this really is. I'm don't understand why you would pass an xml option to atom_feed, hence the wacky output. If that is something that may happen, would you change that regular expression to expect an option of xml + something else ("xml-myoption")?
-
Michael Koziarski August 9th, 2009 @ 02:19 AM
- Tag cleared.
- State changed from new to resolved
Fixed in 370bf1401af62c8589d557cd51b9533dd603c463
-
Repository August 9th, 2009 @ 05:27 AM
- State changed from resolved to committed
(from [796b7c6ce62559be253b8a2c8ff2a6e447a60d7f]) Don't call additional methods on builders passed to the atom_feed helper.
Additionally, actually test that the atom_feed helper works with :xml as an option.
[#1836 state:committed] http://github.com/rails/rails/commit/796b7c6ce62559be253b8a2c8ff2a6...
-
Repository August 9th, 2009 @ 05:27 AM
(from [370bf1401af62c8589d557cd51b9533dd603c463]) Don't call additional methods on builders passed to the atom_feed helper.
Additionally, actually test that the atom_feed helper works with :xml as an option.
[#1836 state:committed] http://github.com/rails/rails/commit/370bf1401af62c8589d557cd51b953...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Referenced by
- 1836 AtomFeedBuilder renders not valid xml when using options[:xml] [#1836 state:committed] http://github.com/rails/rails/co...
- 1836 AtomFeedBuilder renders not valid xml when using options[:xml] [#1836 state:committed] http://github.com/rails/rails/co...