mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
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.
This commit is contained in:
parent
0cdedf612b
commit
c812223c9f
1 changed files with 2 additions and 1 deletions
|
|
@ -1032,7 +1032,8 @@ by https://www.w3.org/TR/xml/#charsets), signal an error of type
|
||||||
(insert string)
|
(insert string)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(when (re-search-forward
|
(when (re-search-forward
|
||||||
"[^\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD\U00010000-\U0010FFFF]")
|
"[^\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD\U00010000-\U0010FFFF]"
|
||||||
|
nil t)
|
||||||
(signal 'xml-invalid-character (list (char-before) (match-beginning 0))))
|
(signal 'xml-invalid-character (list (char-before) (match-beginning 0))))
|
||||||
(dolist (substitution '(("&" . "&")
|
(dolist (substitution '(("&" . "&")
|
||||||
("<" . "<")
|
("<" . "<")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue