summaryrefslogtreecommitdiff
path: root/lisp/net/eww.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2016-01-24 17:50:27 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2016-01-24 17:50:27 +0100
commit7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b (patch)
tree2f9885c2571b9e991a4cb4159fd0eb3533de8c77 /lisp/net/eww.el
parent6f747a7c570b2f965b6809221465b881eb61adab (diff)
downloademacs-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.el5
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)))