emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r107427: shr.el (shr-column-specs): P


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107427: shr.el (shr-column-specs): Protect against TDs with "width: 0%".
Date: Sat, 25 Feb 2012 13:20:57 +0000
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107427
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Sat 2012-02-25 13:20:57 +0000
message:
  shr.el (shr-column-specs): Protect against TDs with "width: 0%".
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/shr.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2012-02-23 23:11:13 +0000
+++ b/lisp/gnus/ChangeLog       2012-02-25 13:20:57 +0000
@@ -1,3 +1,7 @@
+2012-02-25  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * shr.el (shr-column-specs): Protect against TDs with "width: 0%".
+
 2012-02-23  Katsumi Yamaoka  <address@hidden>
 
        * nntp.el (nntp-send-authinfo): Work for secure nntp entry in authinfo.

=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el  2012-02-18 22:28:00 +0000
+++ b/lisp/gnus/shr.el  2012-02-25 13:20:57 +0000
@@ -1364,10 +1364,10 @@
            (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))
 


reply via email to

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