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:
parent
57d0e3d5ae
commit
b1a3ebedba
1 changed files with 4 additions and 0 deletions
|
@ -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)))))
|
||||
|
|
Loading…
Add table
Reference in a new issue