emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106040: * lisp/gnus/html2text.el (ht


From: Andreas Schwab
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106040: * lisp/gnus/html2text.el (html2text-get-attr): Correctly handle attribute values
Date: Sun, 09 Oct 2011 18:51:38 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106040
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Sun 2011-10-09 18:51:38 +0200
message:
  * lisp/gnus/html2text.el (html2text-get-attr): Correctly handle attribute 
values
  containing "=".
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/html2text.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-10-06 22:11:15 +0000
+++ b/lisp/gnus/ChangeLog       2011-10-09 16:51:38 +0000
@@ -1,3 +1,8 @@
+2011-10-09  Andreas Schwab  <address@hidden>
+
+       * html2text.el (html2text-get-attr): Correctly handle attribute values
+       containing "=".
+
 2011-09-22  Kan-Ru Chen  <address@hidden>
 
        * ecomplete.el (ecomplete-display-matches): Use a local keymap to

=== modified file 'lisp/gnus/html2text.el'
--- a/lisp/gnus/html2text.el    2011-01-25 04:08:28 +0000
+++ b/lisp/gnus/html2text.el    2011-10-09 16:51:38 +0000
@@ -193,7 +193,7 @@
      ;; 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 @@
        ;; 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 @@
     (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))))
 
 ;;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]