Fix printing non-terminated strings in devlist XML.

MFC after:	1 week

(cherry picked from commit 0963d8042b3129788a04f3b99596ffeef457dc3f)