summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-30 21:38:45 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-30 21:38:45 +0100
commit3199fd448e0e15c23096460647b21f361561a2c7 (patch)
tree076e36633c30b43ae43c897a682585c5bcd7eef6
parent885f08e4eb78ce0ad6c2a86a33f89483a30018e0 (diff)
When returning a journal entry via XML-RPC, convert the content to HTML first.
Ignore-this: 9d27a2ac2c9b9f4b5b4c1ae95d7de792 darcs-hash:0d6505c5e3e851527d0ddcc858df798d366c580b
-rwxr-xr-xjournal.lisp10
-rw-r--r--xml-rpc-functions.lisp2
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)))