aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/net/eww.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 3ec6c1cfd3b..3e9334532c6 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -471,11 +471,9 @@ Currently this means either text/html or application/xhtml+xml."
471 (decode-coding-region (point) (point-max) encode) 471 (decode-coding-region (point) (point-max) encode)
472 (coding-system-error nil)) 472 (coding-system-error nil))
473 (save-excursion 473 (save-excursion
474 ;; Remove CRLF and NULL before parsing. 474 ;; Remove CRLF and replace NUL with � before parsing.
475 (while (re-search-forward "\\(\r$\\)\\|\\(\000\\)" nil t) 475 (while (re-search-forward "\\(\r$\\)\\|\0" nil t)
476 (replace-match (if (match-beginning 1) 476 (replace-match (if (match-beginning 1) "" "�") t t)))
477 ""
478 "\\0") t t)))
479 (libxml-parse-html-region (point) (point-max)))))) 477 (libxml-parse-html-region (point) (point-max))))))
480 (source (and (null document) 478 (source (and (null document)
481 (buffer-substring (point) (point-max))))) 479 (buffer-substring (point) (point-max)))))