diff options
| author | Lars Magne Ingebrigtsen | 2014-12-09 05:18:12 +0100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2014-12-09 05:18:12 +0100 |
| commit | c3ea511964facdd86cc41c15f352e995a8061820 (patch) | |
| tree | 1fbf69b9528bf9abb69cdf13954ba55e2b7ddc6f | |
| parent | a005f610188cb025216b101f06b66fae026053d8 (diff) | |
| download | emacs-c3ea511964facdd86cc41c15f352e995a8061820.tar.gz emacs-c3ea511964facdd86cc41c15f352e995a8061820.zip | |
Make inline SVGs work in shr again
* net/shr.el (shr-dom-print): Don't print comments.
(shr-tag-svg): Give inline SVG images the right type.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/net/shr.el | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e2dbe92c663..54ada6e448c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2014-12-09 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2014-12-09 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * net/shr.el (shr-dom-print): Don't print comments. | ||
| 4 | (shr-tag-svg): Give inline SVG images the right type. | ||
| 5 | |||
| 3 | * net/eww.el (eww-update-header-line-format): Mark valid/invalid | 6 | * net/eww.el (eww-update-header-line-format): Mark valid/invalid |
| 4 | certificates in the header line. | 7 | certificates in the header line. |
| 5 | (eww-invalid-certificate, eww-valid-certificate): New faces. | 8 | (eww-invalid-certificate, eww-valid-certificate): New faces. |
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index e23fd0b0ca5..186c9f5757d 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -1019,6 +1019,8 @@ ones, in case fg and bg are nil." | |||
| 1019 | (cond | 1019 | (cond |
| 1020 | ((stringp elem) | 1020 | ((stringp elem) |
| 1021 | (insert elem)) | 1021 | (insert elem)) |
| 1022 | ((eq (dom-tag elem) 'comment) | ||
| 1023 | ) | ||
| 1022 | ((or (not (eq (dom-tag elem) 'image)) | 1024 | ((or (not (eq (dom-tag elem) 'image)) |
| 1023 | ;; Filter out blocked elements inside the SVG image. | 1025 | ;; Filter out blocked elements inside the SVG image. |
| 1024 | (not (setq url (dom-attr elem ':xlink:href))) | 1026 | (not (setq url (dom-attr elem ':xlink:href))) |
| @@ -1031,7 +1033,8 @@ ones, in case fg and bg are nil." | |||
| 1031 | (defun shr-tag-svg (dom) | 1033 | (defun shr-tag-svg (dom) |
| 1032 | (when (and (image-type-available-p 'svg) | 1034 | (when (and (image-type-available-p 'svg) |
| 1033 | (not shr-inhibit-images)) | 1035 | (not shr-inhibit-images)) |
| 1034 | (funcall shr-put-image-function (shr-dom-to-xml dom) "SVG Image"))) | 1036 | (funcall shr-put-image-function (list (shr-dom-to-xml dom) 'image/svg+xml) |
| 1037 | "SVG Image"))) | ||
| 1035 | 1038 | ||
| 1036 | (defun shr-tag-sup (dom) | 1039 | (defun shr-tag-sup (dom) |
| 1037 | (let ((start (point))) | 1040 | (let ((start (point))) |