diff --git a/moli-renderer-v8/src/runtime/markdown_dump/visibility.rs b/moli-renderer-v8/src/runtime/markdown_dump/visibility.rs index 7d41467c09b..aabbcfacc6d 100644 --- a/moli-renderer-v8/src/runtime/markdown_dump/visibility.rs +++ b/moli-renderer-v8/src/runtime/markdown_dump/visibility.rs @@ -168,8 +168,11 @@ impl<'a, D: MarkdownSource> MarkdownDom<'a, D> { // A clean textarea gets its default from child text, not the // control-state slot (which is initially empty). Once dirty, // even an empty live value is authoritative. + // Range and color always sanitize a value; export it only when + // the author supplied one, as the sanitized `.value` reports. let authored_control = - matches!(element.input_type(), InputType::Range | InputType::Color); + matches!(element.input_type(), InputType::Range | InputType::Color) + && element.attribute("value").is_none_or(str::is_empty); if (element.is_html_input() && !authored_control) || element.input_value_dirty() { attribute_overrides .entry(node) diff --git a/moli-renderer-v8/src/runtime/page_vm/tests/markdown_dump.rs b/moli-renderer-v8/src/runtime/page_vm/tests/markdown_dump.rs index c5c37ba15a6..ef4b311b7c3 100644 --- a/moli-renderer-v8/src/runtime/page_vm/tests/markdown_dump.rs +++ b/moli-renderer-v8/src/runtime/page_vm/tests/markdown_dump.rs @@ -581,7 +581,10 @@ async fn markdown_live_structure_and_visibility_have_exact_outputs() { ("

Hi

", "# Hi"), ("12", "12"), (" ", "Volume"), - (" ", "abc invalid"), + (" ", "50 #000000"), + (" ", "Volume 100 #ff0000"), + ("

Body text

Pic", "Body text\n\n![Pic](https://example.test/p.png)"), + ("", "[Video](https://example.test/a.webm) [Video](https://example.test/a.mp4)\n\n[Audio](https://example.test/b.ogg)"), ("
AB
", "A\n\nB"), ("

AB

", "A\n\nB"), ("Active Reviewed", "Active Reviewed"), diff --git a/moli-renderer-v8/src/style_engine/ua/html.css b/moli-renderer-v8/src/style_engine/ua/html.css index a6e04c42da9..42b33e2e145 100644 --- a/moli-renderer-v8/src/style_engine/ua/html.css +++ b/moli-renderer-v8/src/style_engine/ua/html.css @@ -253,7 +253,7 @@ h6 { } base, basefont, datalist, head, link, meta, noembed, noframes, param, rp, -script, style, template, title, source { +script, style, template, title { display: none; }