diff options
| author | Lars Ingebrigtsen | 2016-01-24 17:50:27 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-01-24 17:50:27 +0100 |
| commit | 7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b (patch) | |
| tree | 2f9885c2571b9e991a4cb4159fd0eb3533de8c77 | |
| parent | 6f747a7c570b2f965b6809221465b881eb61adab (diff) | |
| download | emacs-7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b.tar.gz emacs-7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b.zip | |
* eww.el (eww-render): Protect against empty content-types.
| -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." | |||
| 315 | (let* ((headers (eww-parse-headers)) | 315 | (let* ((headers (eww-parse-headers)) |
| 316 | (content-type | 316 | (content-type |
| 317 | (mail-header-parse-content-type | 317 | (mail-header-parse-content-type |
| 318 | (or (cdr (assoc "content-type" headers)) | 318 | (if (zerop (length (cdr (assoc "content-type" headers)))) |
| 319 | "text/plain"))) | 319 | "text/plain" |
| 320 | (cdr (assoc "content-type" headers))))) | ||
| 320 | (charset (intern | 321 | (charset (intern |
| 321 | (downcase | 322 | (downcase |
| 322 | (or (cdr (assq 'charset (cdr content-type))) | 323 | (or (cdr (assq 'charset (cdr content-type))) |