From f1528c036b79ca90df67d2e84bb7c2c1d048c482 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Fri, 9 Oct 2009 00:10:54 +0200 Subject: =?UTF-8?q?Fix=20the=20display=20of=20entries=20of=20type=20?= =?UTF-8?q?=E2=80=9Chtml=E2=80=9D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignore-this: 4ff8f3464673f1f27ac9d444b9e7f975 darcs-hash:0eaa27bd94d09a8e489c800088767318bc0ff273 --- journal.lisp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/journal.lisp b/journal.lisp index b0d3ec5..b8ec11d 100755 --- a/journal.lisp +++ b/journal.lisp @@ -167,7 +167,9 @@ ("xml:lang" "de") ("xml:base" ,(link-to :index :absolute t)))) (with-tag ("div" '(("xmlns" "http://www.w3.org/1999/xhtml"))) - (xml-as-is (journal-markup->html (body-of journal-entry))))))))) + (xml-as-is (if (equal (entry-type-of journal-entry) "html") + (body-of journal-entry) + (journal-markup->html (body-of journal-entry)))))))))) #.(restore-sql-reader-syntax-state)) @@ -250,8 +252,8 @@ (defun show-journal-entry (journal-entry &key (comments-p nil)) - (with-slots (id title body categories date) journal-entry - (show-journal-entry-with-components id title body categories date + (with-slots (id title body categories date type) journal-entry + (show-journal-entry-with-components id title body categories date type (comments-about journal-entry :ordered-p t :ham-p t) @@ -261,8 +263,8 @@ :ham-p t)))) -(defun show-journal-entry-with-components (id title body categories - posting-date comments comments-p trackbacks) +(defun show-journal-entry-with-components (id title body categories posting-date + type comments comments-p trackbacks) (unless *full-entry-view* (<:tr (<:td (<:a :href (link-to :view :post-id id) @@ -287,7 +289,9 @@ (<:as-html (format nil "Abgeheftet unter ..."))))) (<:div :class :journal-entry-body - (<:as-is (journal-markup->html body))) + (<:as-is (if (equal type "html") + body + (journal-markup->html body)))) (<:div :class :journal-entry-footer (<:form :class :journal-entry-delete-button-form :style "display: inline;" @@ -621,6 +625,7 @@ body nil (get-universal-time) + "markdown" nil nil nil) -- cgit v1.2.3