diff options
| author | Lars Ingebrigtsen | 2020-05-25 15:03:37 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-05-25 15:03:37 +0200 |
| commit | c812223c9fc2684d0edc9cb848cfa6d83c6fdb9a (patch) | |
| tree | 88f3c4e8111079e4fb3f34ea22645ef2e30825d5 | |
| parent | 0cdedf612b9da14fccc39c4a4e81cbf400e4552f (diff) | |
| download | emacs-c812223c9fc2684d0edc9cb848cfa6d83c6fdb9a.tar.gz emacs-c812223c9fc2684d0edc9cb848cfa6d83c6fdb9a.zip | |
Don't bug out in xml-escape-string if invalid characters aren't present
* lisp/xml.el (xml-escape-string): Don't bug out if invalid
characters aren't present.
| -rw-r--r-- | lisp/xml.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/xml.el b/lisp/xml.el index 767cf042846..10ef8e2087a 100644 --- a/lisp/xml.el +++ b/lisp/xml.el | |||
| @@ -1032,7 +1032,8 @@ by https://www.w3.org/TR/xml/#charsets), signal an error of type | |||
| 1032 | (insert string) | 1032 | (insert string) |
| 1033 | (goto-char (point-min)) | 1033 | (goto-char (point-min)) |
| 1034 | (when (re-search-forward | 1034 | (when (re-search-forward |
| 1035 | "[^\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD\U00010000-\U0010FFFF]") | 1035 | "[^\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD\U00010000-\U0010FFFF]" |
| 1036 | nil t) | ||
| 1036 | (signal 'xml-invalid-character (list (char-before) (match-beginning 0)))) | 1037 | (signal 'xml-invalid-character (list (char-before) (match-beginning 0)))) |
| 1037 | (dolist (substitution '(("&" . "&") | 1038 | (dolist (substitution '(("&" . "&") |
| 1038 | ("<" . "<") | 1039 | ("<" . "<") |