Revision: emacs@sv.gnu.org/gnus--devo--0--patch-42
[gnus] / lisp / html2text.el
index 31dc31f..de9cf64 100644 (file)
@@ -1,5 +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>
 
 (defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr)))
 
 (defvar html2text-replace-list
-  '(("&nbsp;" . " ") ("&gt;" . ">") ("&lt;" . "<") ("&quot;" . "\"")
-    ("&amp;" . "&") ("&apos;" . "'"))
+  '(("&acute;" . "`")
+    ("&amp;" . "&")
+    ("&apos;" . "'")
+    ("&brvbar;" . "|")
+    ("&cent;" . "c")
+    ("&circ;" . "^")
+    ("&copy;" . "(C)")
+    ("&curren;" . "(#)")
+    ("&deg;" . "degree")
+    ("&divide;" . "/")
+    ("&euro;" . "e")
+    ("&frac12;" . "1/2")
+    ("&gt;" . ">")
+    ("&iquest;" . "?")
+    ("&laquo;" . "<<")
+    ("&ldquo" . "\"")
+    ("&lsaquo;" . "(")
+    ("&lsquo;" . "`")
+    ("&lt;" . "<")
+    ("&mdash;" . "--")
+    ("&nbsp;" . " ")
+    ("&ndash;" . "-")
+    ("&permil;" . "%%")
+    ("&plusmn;" . "+-")
+    ("&pound;" . "£")
+    ("&quot;" . "\"")
+    ("&raquo;" . ">>")
+    ("&rdquo" . "\"")
+    ("&reg;" . "(R)")
+    ("&rsaquo;" . ")")
+    ("&rsquo;" . "'")
+    ("&sect;" . "§")
+    ("&sup1;" . "^1")
+    ("&sup2;" . "^2")
+    ("&sup3;" . "^3")
+    ("&tilde;" . "~"))
   "The map of entity to text.
 
 This is an alist were each element is a dotted pair consisting of an
@@ -58,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'.