bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41094: 28.0.50; `xml-print' produces invalid XML


From: Philipp Stephani
Subject: bug#41094: 28.0.50; `xml-print' produces invalid XML
Date: Sat, 23 May 2020 14:03:39 +0200

Am Di., 5. Mai 2020 um 14:32 Uhr schrieb Philipp <p.stephani2@gmail.com>:
>
>
> For example:
>
> emacs -Q -batch -l xml -eval '(with-temp-buffer (xml-print (quote ((foo nil 
> "\0")))) (write-region nil nil "/tmp/test.xml"))' && xmllint /tmp/test.xml
> /tmp/test.xml:1: parser error : Premature end of data in tag foo line 1
> <foo>
>      ^
>
> `xml-print' here generates a NUL character, which is invalid in XML
> (cf. https://www.w3.org/TR/xml/#charsets).  Probably `xml-escape-string'
> should error out when encountering any invalid character (including
> non-Unicode characters).

Fixed with commit f8581bcf6a.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]