diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2011-10-09 18:51:38 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2011-10-09 18:51:38 +0200 |
commit | e3b10342fb9a9d2ab7e5ae2777150b69ed311975 (patch) | |
tree | 52f1636cd254a822c0d64cc1c6c0351bee349b62 /lisp | |
parent | 496774950d0095eb8e2618a7657d81cdde150df9 (diff) | |
download | emacs-e3b10342fb9a9d2ab7e5ae2777150b69ed311975.tar.gz |
* lisp/gnus/html2text.el (html2text-get-attr): Correctly handle attribute values
containing "=".
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/gnus/html2text.el | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 69041ccbbd0..9c76635fb63 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-10-09 Andreas Schwab <schwab@linux-m68k.org> + + * html2text.el (html2text-get-attr): Correctly handle attribute values + containing "=". + 2011-09-22 Kan-Ru Chen <kanru@kanru.info> * ecomplete.el (ecomplete-display-matches): Use a local keymap to diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el index 0635ab0afc6..7e699827141 100644 --- a/lisp/gnus/html2text.el +++ b/lisp/gnus/html2text.el @@ -193,7 +193,7 @@ formatting, and then moved afterward.") ;; size=3 ((string-match "[^ ]=[^ ]" prev) (let ((attr (nth 0 (split-string prev "="))) - (value (nth 1 (split-string prev "=")))) + (value (substring prev (1+ (string-match "=" prev))))) (setq attr-list (cons (list attr value) attr-list)))) ;; size= 3 ((string-match "[^ ]=\\'" prev) @@ -204,7 +204,7 @@ formatting, and then moved afterward.") ;; size=3 ((string-match "[^ ]=[^ ]" this) (let ((attr (nth 0 (split-string this "="))) - (value (nth 1 (split-string this "=")))) + (value (substring prev (1+ (string-match "=" this))))) (setq attr-list (cons (list attr value) attr-list)))) ;; size =3 ((string-match "\\`=[^ ]" this) @@ -358,7 +358,7 @@ formatting, and then moved afterward.") (delete-region p1 p4) (when href (goto-char p1) - (insert (substring href 1 -1 )) + (insert (substring href 1 -1)) (put-text-property p1 (point) 'face 'bold)))) ;; |