html2text.el (html2text-clean-anchor): Check for quotes around `href' value.
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 11 Oct 2011 22:06:16 +0000 (22:06 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 11 Oct 2011 22:06:16 +0000 (22:06 +0000)
lisp/ChangeLog
lisp/html2text.el

index 2a109ca..e72b34d 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-11  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * html2text.el (html2text-clean-anchor): Check for quotes around
+       `href' value.
+
 2011-10-11  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-check-BBDB): Simplify and support BBDB 3.x when
index 7e69982..8cfd9b9 100644 (file)
@@ -358,7 +358,8 @@ formatting, and then moved afterward.")
     (delete-region p1 p4)
     (when href
       (goto-char p1)
-      (insert (substring href 1 -1))
+      (insert (if (string-match "\\`['\"].*['\"]\\'" href)
+                 (substring href 1 -1) href))
       (put-text-property p1 (point) 'face 'bold))))
 
 ;;