about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-11-28 01:44:21 +0000
committerEric Wong <e@80x24.org>2015-11-28 01:44:21 +0000
commit2a44cf2bb91150cbbe8e438a6cae5bf1e5015d61 (patch)
tree2213b8b2c7b70113641b67fb5e73896433fb167d
parentf3fca1c71028147e30bdf4231fb42e27e1b49cd9 (diff)
downloadolddoc-2a44cf2bb91150cbbe8e438a6cae5bf1e5015d61.tar.gz
news_atom: add missing <div> for XHTML
This should help the XHTML render properly in more feed readers.

ref: RFC 4287 Section 4.1.3.4
-rw-r--r--lib/olddoc/news_atom.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/olddoc/news_atom.rb b/lib/olddoc/news_atom.rb
index 6a92b3e..7c63db2 100644
--- a/lib/olddoc/news_atom.rb
+++ b/lib/olddoc/news_atom.rb
@@ -33,7 +33,11 @@ module Olddoc::NewsAtom
           uri = tag_uri(tag[:tag]).to_s
           x.link(rel: "alternate", type: 'text/html', href: uri)
           x.id(uri)
-          x.content(type: :xhtml) { x.pre(tag[:body]) }
+          x.content(type: :xhtml) do
+            x.div(xmlns: 'http://www.w3.org/1999/xhtml') do
+              x.pre(tag[:body])
+            end
+          end
         end # entry
       end # new_tags
     end # feed