Neutralise CR and form feed in CSS variable export strings

Found while testing crates/engine/src/cmd/variables_io.rs:~92 (css_safe, used by css for String values and mode names)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
NetterSilver
2026-10-29 13:30:36 +01:00
co-authored by Claude Haiku 5.5
parent 72b4269383
commit 4d47c350c1
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ fn export(s: &mut Session, p: &Value) -> Result<Value> {
/// `text` as a CSS comment or quoted string body.
fn css_safe(text: &str) -> String {
text.replace("*/", "* /").replace(['"', '\\', '\n'], " ")
text.replace("*/", "* /").replace(['"', '\\', '\n', '\r', '\u{c}'], " ")
}
/// Each collection's variables as custom properties (named as generated code names them): the