From: Ben Pfaff Date: Tue, 9 Dec 2025 01:56:19 +0000 (-0800) Subject: work X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6254b8e4aa8b7fd15caac04a53129065e620cfd;p=pspp work --- 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}

") + } }