Changeset

12799:3784a8ce0596 0.12 0.12.2

Merge 0.11->0.12
author Kim Alvefur <zash@zash.se>
date Mon, 12 Dec 2022 07:07:13 +0100
parents 12796:d7853bbc88ea (current diff) 12798:c4b1b5cbc20b (diff)
children 12801:ebd6b4d8bf04
files .hgtags util/stanza.lua
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sun Nov 13 18:16:59 2022 +0100
+++ b/.hgtags	Mon Dec 12 07:07:13 2022 +0100
@@ -80,5 +80,7 @@
 d117b92fd8e459170a98a8dece7f3930f4b6aed7 0.11.10
 76b4e3f12b53fedae96402d87fa9ee79e704ce5e 0.11.11
 783056b4e4480389d0e27883289b1bfef57e4729 0.11.12
+ebeb4d959fb3fdbc9235fd42e16a33f3f78241a8 0.11.13
 50fcd387948263335ca98dc98de2a3087b543f8b 0.12.0
 252ed01896dd815700593b86834c776d0fef828d 0.12.1
+be09ac8300a7bde4e81f7cc4e4ee5b0745ab14b7 0.11.14
--- a/util/stanza.lua	Sun Nov 13 18:16:59 2022 +0100
+++ b/util/stanza.lua	Mon Dec 12 07:07:13 2022 +0100
@@ -34,8 +34,12 @@
 local stanza_mt = { __name = "stanza" };
 stanza_mt.__index = stanza_mt;
 
+-- Basic check for valid XML character data.
+-- Disallow control characters.
+-- Tab U+09 and newline U+0A are allowed.
+-- For attributes, allow the \1 separator between namespace and name.
 local function valid_xml_cdata(str, attr)
-	return not s_find(str, attr and "[^\1\9\10\13\20-~\128-\247]" or "[^\9\10\13\20-~\128-\247]");
+	return not s_find(str, attr and "[^\1\9\10\13\20-\255]" or "[^\9\10\13\20-\255]");
 end
 
 local function check_name(name, name_type)