]> git.eshelyaron.com Git - emacs.git/commitdiff
shr.el (shr-column-specs): Protect against TDs with "width: 0%".
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 25 Feb 2012 13:20:57 +0000 (13:20 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sat, 25 Feb 2012 13:20:57 +0000 (13:20 +0000)
lisp/gnus/ChangeLog
lisp/gnus/shr.el

index e58b6cc777373685805daa9c6c7b267a2a7e09ac..5b9ffc07d1ca3ff19129e651cb672c8544fed031 100644 (file)
@@ -1,3 +1,7 @@
+2012-02-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * shr.el (shr-column-specs): Protect against TDs with "width: 0%".
+
 2012-02-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * nntp.el (nntp-send-authinfo): Work for secure nntp entry in authinfo.
index dd0f1599c36226cf96766f36f5aaed826751508f..41f122439719fa8255d663e524a5947690b93a05 100644 (file)
@@ -1364,10 +1364,10 @@ ones, in case fg and bg are nil."
            (when (memq (car column) '(td th))
              (let ((width (cdr (assq :width (cdr column)))))
                (when (and width
-                          (string-match "\\([0-9]+\\)%" width))
-                 (aset columns i
-                       (/ (string-to-number (match-string 1 width))
-                          100.0))))
+                          (string-match "\\([0-9]+\\)%" width)
+                          (not (zerop (setq width (string-to-number
+                                                   (match-string 1 width))))))
+                 (aset columns i (/ width 100.0))))
              (setq i (1+ i)))))))
     columns))