Fix display of <pre> elements
* lisp/net/eww.el (eww-display-html): Remove CRLF before parsing so that <pre> elements don't render with ^M at the end of the lines.
This commit is contained in:
@@ -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)))))
|
||||
|
||||
Reference in New Issue
Block a user