From 5d51dff9e66d03cd651144d831d0bb5d18464f7e Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 26 Apr 2017 00:22:40 +0100 Subject: [PATCH] disco: Bump minidom dependency to 0.2.0, which fixes xml:lang parsing. --- Cargo.toml | 2 +- src/disco.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b46e00d7..c049bd61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Emmanuel Gil Peyrot "] [dependencies] -minidom = "0.1.1" +minidom = "0.2.0" jid = "0.2.0" base64 = "0.4.1" digest = "0.5.0" diff --git a/src/disco.rs b/src/disco.rs index 4ac7240e..5961518c 100644 --- a/src/disco.rs +++ b/src/disco.rs @@ -60,8 +60,7 @@ pub fn parse_disco(root: &Element) -> Result { return Err(Error::ParseError("Identity must have a non-empty 'type' attribute.")) } - // TODO: this must check for the namespace of the attribute, but minidom doesn’t support that yet, see issue #2. - let xml_lang = child.attr("lang").unwrap_or(""); + let xml_lang = child.attr("xml:lang").unwrap_or(""); let name = child.attr("name") .and_then(|name| name.parse().ok()); identities.push(Identity {