From d6254b8e4aa8b7fd15caac04a53129065e620cfd Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 8 Dec 2025 17:56:19 -0800 Subject: [PATCH] work --- rust/pspp/Cargo.toml | 2 +- rust/pspp/src/output/pivot/look_xml.rs | 2 +- rust/pspp/src/output/spv/html.rs | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/rust/pspp/Cargo.toml b/rust/pspp/Cargo.toml index 82a0c51624..ee99cfce76 100644 --- a/rust/pspp/Cargo.toml +++ b/rust/pspp/Cargo.toml @@ -30,7 +30,7 @@ libm = "0.2.11" smallstr = "0.3.0" itertools = "0.14.0" unicode-linebreak = "0.1.5" -quick-xml = { version = "0.38.4", features = ["serialize"] } +quick-xml = { version = "0.38.4", features = ["serialize", "escape-html"] } serde = { version = "1.0.218", features = ["derive", "rc"] } color = { version = "0.2.3", features = ["serde"] } binrw = "0.14.1" diff --git a/rust/pspp/src/output/pivot/look_xml.rs b/rust/pspp/src/output/pivot/look_xml.rs index 85bc1186a3..1c3c64d031 100644 --- a/rust/pspp/src/output/pivot/look_xml.rs +++ b/rust/pspp/src/output/pivot/look_xml.rs @@ -781,7 +781,7 @@ mod tests { underline: false, font: String::from("Sans Serif"), fg: Color::BLACK, - bg: Color::BLACK, + bg: Color::WHITE, size: 9, }, }, diff --git a/rust/pspp/src/output/spv/html.rs b/rust/pspp/src/output/spv/html.rs index 6515b07f18..4db98918fc 100644 --- a/rust/pspp/src/output/spv/html.rs +++ b/rust/pspp/src/output/spv/html.rs @@ -914,4 +914,12 @@ mod tests { r##"

Page &[Page]

"## ); } + + /// Checks that the `escape-html` feature is enabled in [quick_xml], since + /// we need that to resolve ` ` and other HTML entities. + #[test] + fn html_escapes() { + let html = Document::from_html(" "); + assert_eq!(html.to_html(), "

\u{a0}

") + } } -- 2.30.2