Including them in the XML makes them unparsable.
https://bugzilla.redhat.com/show_bug.cgi?id=
1184131
/* This function allocates memory from the heap for the property
- * value. That memory must be later freed by some other code. */
+ * value. That memory must be later freed by some other code.
+ * Any control characters that cannot be printed in the XML are stripped
+ * from the string */
static int udevGetDeviceSysfsAttr(struct udev_device *udev_device,
const char *attr_name,
char **attr_value)
ret = udevGetDeviceSysfsAttr(udev_device, attr_name, &tmp);
+ virStringStripControlChars(tmp);
+
if (tmp != NULL && (STREQ(tmp, ""))) {
VIR_FREE(tmp);
tmp = NULL;