From: Andreas Schwab Date: Sun, 9 Oct 2011 16:51:38 +0000 (+0200) Subject: * lisp/gnus/html2text.el (html2text-get-attr): Correctly handle attribute values X-Git-Tag: emacs-pretest-24.0.91~166 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e3b10342fb9a9d2ab7e5ae2777150b69ed311975;p=emacs.git * lisp/gnus/html2text.el (html2text-get-attr): Correctly handle attribute values containing "=". --- 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 + + * html2text.el (html2text-get-attr): Correctly handle attribute values + containing "=". + 2011-09-22 Kan-Ru Chen * 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)))) ;;