From 7cc827eaeb070f7ef6447347e17ae8150a722ed5 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sun, 15 Jul 2007 21:40:46 +0000 Subject: [PATCH] muse-journal: Escape title properly for journal-rss and journal-rdf * lisp/muse-journal.el (muse-journal-rss-munge-buffer): Make sure that title is escaped properly. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-391 --- ChangeLog | 2 ++ lisp/muse-journal.el | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5fbfb48..764cba4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ as read-only -- this fixes an incorrect escaping bug. Remove read-only properties before replacing template matches so that they can still be escaped with entire-document specials later on. + (muse-journal-rss-munge-buffer): Make sure that title is escaped + properly. * lisp/muse-publish.el (muse-insert-file-or-string): Use muse-publish-markup-header-footer-tags. I'm not quite sure how diff --git a/lisp/muse-journal.el b/lisp/muse-journal.el index bba3ff8..617dad6 100644 --- a/lisp/muse-journal.el +++ b/lisp/muse-journal.el @@ -624,7 +624,15 @@ For more on the structure of this list, see (replace-match (or date "") nil t)) (goto-char (point-min)) (while (search-forward "%title%" nil t) - (replace-match (or title "Untitled") nil t)) + (replace-match "") + (save-restriction + (narrow-to-region (point) (point)) + (insert (or title "Untitled")) + (remove-text-properties (match-beginning 0) (match-end 0) + '(read-only nil rear-nonsticky nil)) + (let ((muse-publishing-current-style (muse-style "xml"))) + (muse-publish-escape-specials (point-min) (point-max) + nil 'document)))) (goto-char (point-min)) (while (search-forward "%desc%" nil t) (replace-match desc nil t)) -- 2.11.4.GIT