diff --git a/lisp/net/eww.el b/lisp/net/eww.el index da920c14aec..551517b9d64 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -402,6 +402,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)))))