From 3199fd448e0e15c23096460647b21f361561a2c7 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Fri, 30 Oct 2009 21:38:45 +0100 Subject: When returning a journal entry via XML-RPC, convert the content to HTML first. Ignore-this: 9d27a2ac2c9b9f4b5b4c1ae95d7de792 darcs-hash:0d6505c5e3e851527d0ddcc858df798d366c580b --- journal.lisp | 10 +++++++--- xml-rpc-functions.lisp | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/journal.lisp b/journal.lisp index 96bc7c6..74dfb40 100755 --- a/journal.lisp +++ b/journal.lisp @@ -177,12 +177,16 @@ ("xml:lang" "de") ("xml:base" ,(link-to :index :absolute t)))) (with-tag ("div" '(("xmlns" "http://www.w3.org/1999/xhtml"))) - (xml-as-is (if (equal (entry-type-of journal-entry) "html") - (body-of journal-entry) - (journal-markup->html (body-of journal-entry)))))))))) + (xml-as-is (htmlise-entry journal-entry)))))))) #.(restore-sql-reader-syntax-state)) +(defun htmlise-entry (journal-entry) + (if (equal (entry-type-of journal-entry) "html") + (body-of journal-entry) + (journal-markup->html (body-of journal-entry)))) + + (defun show-atom-feed (&key include-edit-links full-content) #.(locally-enable-sql-reader-syntax) (revalidate-cache-or-die "application/atom+xml; charset=UTF-8") diff --git a/xml-rpc-functions.lisp b/xml-rpc-functions.lisp index 0bba5c6..41ee2a3 100644 --- a/xml-rpc-functions.lisp +++ b/xml-rpc-functions.lisp @@ -49,7 +49,7 @@ (xml-rpc-struct :categories (mapcar #'uuid-of categories) :pub-date (xml-rpc-time date) :guid uuid - :description body + :description (htmlise-entry (find-entry postid)) :link (link-to :view :post-id postid :absolute t) :comments (link-to :view :post-id postid :absolute t) :title title))) -- cgit v1.2.3