summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac <arunisaac@systemreboot.net>2016-06-14 01:33:54 +0530
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-06-14 13:56:55 +0200
commitf364d55e2e82361486ad543de16a298687896de9 (patch)
tree0c420836322d554afe08f32cb33e0e00a34f7871
parentc792d694b74bc24ce4856db02b8e224b245f3c8e (diff)
downloadorg-mode-f364d55e2e82361486ad543de16a298687896de9.tar.gz
ox-rss: Put email address in <author> element
* contrib/lisp/ox-rss.el (org-rss-headline): Put author's email address in <author> element. The RSS specification requires the email address and the name of the author to be provided in the <author> element in the format "email@domain.com (Name)". Currently, only the author's name is provided. This is invalid RSS.
-rw-r--r--contrib/lisp/ox-rss.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el
index 8b9d319..df22b1a 100644
--- a/contrib/lisp/ox-rss.el
+++ b/contrib/lisp/ox-rss.el
@@ -229,7 +229,8 @@ communication channel."
(if (> (org-export-get-relative-level headline info) 1)
(org-export-data-with-backend headline 'html info)
(unless (org-element-property :footnote-section-p headline)
- (let* ((author (and (plist-get info :with-author)
+ (let* ((email (org-export-data (plist-get info :email) info))
+ (author (and (plist-get info :with-author)
(let ((auth (plist-get info :author)))
(and auth (org-export-data auth info)))))
(htmlext (plist-get info :html-extension))
@@ -273,13 +274,13 @@ communication channel."
"<item>\n"
"<title>%s</title>\n"
"<link>%s</link>\n"
- "<author>%s</author>\n"
+ "<author>%s (%s)</author>\n"
"<guid isPermaLink=\"false\">%s</guid>\n"
"<pubDate>%s</pubDate>\n"
(org-rss-build-categories headline info) "\n"
"<description><![CDATA[%s]]></description>\n"
"</item>\n")
- title publink author guid pubdate contents))))))
+ title publink email author guid pubdate contents))))))
(defun org-rss-build-categories (headline info)
"Build categories for the RSS item."