]> code.delx.au - gnu-emacs/blobdiff - lisp/net/eww.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / net / eww.el
index 7f9f4fad4142229dd84ae67bdc714d8eb848f2bf..91a17755244db488531e51284fe72c7cfcedeb3d 100644 (file)
@@ -410,6 +410,10 @@ Currently this means either text/html or application/xhtml+xml."
                (condition-case nil
                    (decode-coding-region (point) (point-max) encode)
                  (coding-system-error nil))
+                (save-excursion
+                  ;; Remove CRLF before parsing.
+                  (while (re-search-forward "\r$" nil t)
+                    (replace-match "" t t)))
                (libxml-parse-html-region (point) (point-max))))))
        (source (and (null document)
                     (buffer-substring (point) (point-max)))))
@@ -1531,11 +1535,10 @@ If CHARSET is nil then use UTF-8."
 (defun eww-toggle-fonts ()
   "Toggle whether to use monospaced or font-enabled layouts."
   (interactive)
-  (message "Fonts are now %s"
-          (if (setq shr-use-fonts (not shr-use-fonts))
-              "on"
-            "off"))
-  (eww-reload))
+  (setq shr-use-fonts (not shr-use-fonts))
+  (eww-reload)
+  (message "Proportional fonts are now %s"
+           (if shr-use-fonts "on" "off")))
 
 (defun eww-toggle-colors ()
   "Toggle whether to use HTML-specified colors or not."