Autoload epa-select-keys when compiling.
[gnus] / lisp / html2text.el
index 27dc599..05ba8ce 100644 (file)
@@ -1,6 +1,6 @@
 ;;; html2text.el --- a simple html to plain text converter
 
-;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Joakim Hove <hove@phys.ntnu.no>
 
@@ -93,7 +93,7 @@ completely verbatim - without any use of REGEXP.")
 
 This is a list of tags which should be removed, without any
 formatting.  Note that tags in the list are presented *without*
-any \"<\" or \">\".  All occurences of a tag appearing in this
+any \"<\" or \">\".  All occurrences of a tag appearing in this
 list are removed, irrespective of whether it is a closing or
 opening tag, or if the tag has additional attributes.  The
 deletion is done by the function `html2text-remove-tags'.
@@ -456,7 +456,9 @@ See the documentation for that variable."
              (p3) (p4))
          (search-backward "<" (point-min) t)
          (setq p1 (point))
-         (search-forward (format "</%s>" tag) (point-max) t)
+         (unless (search-forward (format "</%s>" tag) (point-max) t)
+           (goto-char p2)
+           (insert (format "</%s>" tag)))
          (setq p4 (point))
          (search-backward "</" (point-min) t)
          (setq p3 (point))