diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2016-01-24 17:50:27 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2016-01-24 17:50:27 +0100 |
commit | 7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b (patch) | |
tree | 2f9885c2571b9e991a4cb4159fd0eb3533de8c77 /lisp/net/eww.el | |
parent | 6f747a7c570b2f965b6809221465b881eb61adab (diff) | |
download | emacs-7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b.tar.gz emacs-7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b.tar.bz2 emacs-7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b.zip |
* eww.el (eww-render): Protect against empty content-types.
Diffstat (limited to 'lisp/net/eww.el')
-rw-r--r-- | lisp/net/eww.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 48bf556a526..29cde247e61 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -315,8 +315,9 @@ Currently this means either text/html or application/xhtml+xml." (let* ((headers (eww-parse-headers)) (content-type (mail-header-parse-content-type - (or (cdr (assoc "content-type" headers)) - "text/plain"))) + (if (zerop (length (cdr (assoc "content-type" headers)))) + "text/plain" + (cdr (assoc "content-type" headers))))) (charset (intern (downcase (or (cdr (assq 'charset (cdr content-type))) |