fu-util-common: strip all trailing whitespace in XML description

Before:
```
└─Thunderbolt controller in Dell dock:
  │   Device ID:           42b9e069d0b5515065cf4a32cec39552861439c9
  │   Description:         Updating the dock improves performance.
  │
  │   Flags:               updatable|require-ac|registered
  │
  └─Thunderbolt controller Update:
        Version:           43.00
        Summary:           Update for the Thunderbolt controller within a Dell dock
        License:           proprietary
        Size:              409.6 kB
        Vendor:            Dell Inc.
        Flags:             trusted-payload
```

After:
```
└─Thunderbolt controller in Dell dock:
  │   Device ID:           42b9e069d0b5515065cf4a32cec39552861439c9
  │   Description:         Updating the dock improves performance.
  │   Flags:               updatable|require-ac|registered
  │
  └─Thunderbolt controller Update:
        Version:           43.00
        Summary:           Update for the Thunderbolt controller within a Dell dock
        License:           proprietary
        Size:              409.6 kB
        Vendor:            Dell Inc.
        Flags:             trusted-payload

```
This commit is contained in:
Mario Limonciello 2019-09-04 15:33:46 -05:00 committed by Mario Limonciello
parent ef3c766e1f
commit 26563d750f

View File

@ -824,12 +824,8 @@ fu_util_convert_description (const gchar *xml, GError **error)
g_set_object (&n, n2);
}
/* remove extra newline */
if (str->len > 0)
g_string_truncate (str, str->len - 1);
/* success */
return g_string_free (g_steal_pointer (&str), FALSE);
return fu_common_strstrip (str->str);
}
static gchar *