olddoc user/dev discussion/patches/bugs/etc
 help / color / mirror / code / Atom feed
* [PATCH] news_atom: add missing <div> for XHTML
@ 2015-11-28  1:47 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-11-28  1:47 UTC (permalink / raw)
  To: olddoc-public

This should help the XHTML render properly in more feed readers.

ref: RFC 4287 Section 4.1.3.4
---
 lib/olddoc/news_atom.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-28  1:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-28  1:47 [PATCH] news_atom: add missing <div> for XHTML Eric Wong

Code repositories for project(s) associated with this public inbox

	http://80x24.org/olddoc.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).