diff --git a/Cargo.lock b/Cargo.lock index 2e86ad3e4..93b173e9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2961,9 +2961,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.37.5" +version = "0.38.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" dependencies = [ "memchr", ] diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 08ebf6a6e..ed263676f 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -11,7 +11,7 @@ shared = { version = "3", path = "../shared" } serde = { version = "1.0", features = ["derive", "rc"] } serde_yaml = "0.9" serde_json = { version = "1", features = ["arbitrary_precision"] } -quick-xml = "0.37" +quick-xml = "0.38" regex = "1.11" clap = { version = "4", features = ["derive"] } url = "2.5" diff --git a/backend/src/api/endpoints/xmltv_api.rs b/backend/src/api/endpoints/xmltv_api.rs index 974624b53..87bd60501 100644 --- a/backend/src/api/endpoints/xmltv_api.rs +++ b/backend/src/api/endpoints/xmltv_api.rs @@ -130,13 +130,13 @@ fn serve_epg_with_timeshift( match xml_reader.read_event_into(&mut buf) { Ok(Event::Start(ref e)) if e.name().as_ref() == b"programme" => { // Modify the attributes - let mut elem = BytesStart::from(e.name()); + let mut elem = BytesStart::new("programme"); for attr in e.attributes() { match attr { Ok(attr) if attr.key.as_ref() == b"start" => { let start_value = attr .decode_and_unescape_value(xml_reader.decoder()) - .expect("Failed to decode start attribute"); + .expect("Failed to decode the start attribute"); // Modify the start attribute value as needed elem.push_attribute(( "start", @@ -146,7 +146,7 @@ fn serve_epg_with_timeshift( Ok(attr) if attr.key.as_ref() == b"stop" => { let stop_value = attr .decode_and_unescape_value(xml_reader.decoder()) - .expect("Failed to decode stop attribute"); + .expect("Failed to decode the stop attribute"); // Modify the stop attribute value as needed elem.push_attribute(( "stop", diff --git a/backend/src/processing/parser/xmltv.rs b/backend/src/processing/parser/xmltv.rs index 3963512f5..2d6905b01 100644 --- a/backend/src/processing/parser/xmltv.rs +++ b/backend/src/processing/parser/xmltv.rs @@ -384,7 +384,7 @@ where fn handle_text_tag(stack: &mut [XmlTag], e: &BytesText) { if !stack.is_empty() { - if let Ok(text) = e.unescape() { + if let Ok(text) = e.decode() { let t = text.trim(); if !t.is_empty() { if let Some(tag) = stack.last_mut() {