From feb37369f7d0bc99d81311edb870e19b3699870f Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Tue, 24 Apr 2007 01:37:27 +0000 Subject: [PATCH] Fix stray footnote references causing control chars to be inserted bug 2007-04-23 Michael Olson * lisp/muse-publish.el (muse-publish-markup-footnote): If we can't find the footnote that goes with a reference, leave the reference as-is. This fixes an error where control characters could be placed in a published document. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-305 --- ChangeLog | 7 +++++++ lisp/muse-publish.el | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ba5bf23..fb4303c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-04-23 Michael Olson + + * lisp/muse-publish.el (muse-publish-markup-footnote): If we can't + find the footnote that goes with a reference, leave the reference + as-is. This fixes an error where control characters could be + placed in a published document. + 2007-04-22 Michael Olson * IDEAS.muse: Add muse-slides.el to list of things to include diff --git a/lisp/muse-publish.el b/lisp/muse-publish.el index 076a266..7b2592b 100644 --- a/lisp/muse-publish.el +++ b/lisp/muse-publish.el @@ -1021,6 +1021,7 @@ The following contexts exist in Muse. (t (let ((footnote (save-match-data (string-to-number (match-string 1)))) + (oldtext (match-string 0)) footnotemark) (delete-region (match-beginning 0) (match-end 0)) (save-excursion @@ -1061,7 +1062,9 @@ The following contexts exist in Muse. (goto-char end) (skip-chars-forward "\n") (delete-region start (point))))) - (muse-insert-markup (or footnotemark footnote)))))) + (if footnotemark + (muse-insert-markup footnotemark) + (insert oldtext)))))) (defun muse-publish-markup-fn-sep () (delete-region (match-beginning 0) (match-end 0)) -- 2.11.4.GIT