[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4927f94: Escape HTML NUL as � in eww
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 4927f94: Escape HTML NUL as � in eww |
Date: |
Wed, 27 Feb 2019 17:37:42 -0500 (EST) |
branch: master
commit 4927f94792ffaab985e0aa3c977eb19308f067cf
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Escape HTML NUL as � in eww
* lisp/net/eww.el (eww-display-html): Escape NUL as � as this
is more appropriate for HTML.
---
lisp/net/eww.el | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 3ec6c1c..3e93345 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."
(decode-coding-region (point) (point-max) encode)
(coding-system-error nil))
(save-excursion
- ;; Remove CRLF and NULL before parsing.
- (while (re-search-forward "\\(\r$\\)\\|\\(\000\\)" nil t)
- (replace-match (if (match-beginning 1)
- ""
- "\\0") t t)))
+ ;; Remove CRLF and replace NUL with � before parsing.
+ (while (re-search-forward "\\(\r$\\)\\|\0" nil t)
+ (replace-match (if (match-beginning 1) "" "�") t t)))
(libxml-parse-html-region (point) (point-max))))))
(source (and (null document)
(buffer-substring (point) (point-max)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4927f94: Escape HTML NUL as � in eww,
Paul Eggert <=