diff options
| author | Lars Ingebrigtsen | 2016-02-16 17:38:58 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-16 17:39:21 +1100 |
| commit | b1a3ebedba88689d26f44cf7db338104b849ae99 (patch) | |
| tree | 628e7aa00d5d9f0de78cd2a4326dc2cce6274b62 | |
| parent | 57d0e3d5ae33184aa66b477d151ec32a4374c836 (diff) | |
| download | emacs-b1a3ebedba88689d26f44cf7db338104b849ae99.tar.gz emacs-b1a3ebedba88689d26f44cf7db338104b849ae99.zip | |
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.
| -rw-r--r-- | lisp/net/eww.el | 4 |
1 files changed, 4 insertions, 0 deletions
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." | |||
| 402 | (condition-case nil | 402 | (condition-case nil |
| 403 | (decode-coding-region (point) (point-max) encode) | 403 | (decode-coding-region (point) (point-max) encode) |
| 404 | (coding-system-error nil)) | 404 | (coding-system-error nil)) |
| 405 | (save-excursion | ||
| 406 | ;; Remove CRLF before parsing. | ||
| 407 | (while (re-search-forward "\r$" nil t) | ||
| 408 | (replace-match "" t t))) | ||
| 405 | (libxml-parse-html-region (point) (point-max)))))) | 409 | (libxml-parse-html-region (point) (point-max)))))) |
| 406 | (source (and (null document) | 410 | (source (and (null document) |
| 407 | (buffer-substring (point) (point-max))))) | 411 | (buffer-substring (point) (point-max))))) |