From 2fdb3dba09c6e13e576ec41fd04089db8975bb91 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 10 Aug 2025 13:17:36 -0500 Subject: [PATCH] Update minify-html --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- src/routes/index.rs | 13 +++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c18eb41..10c923f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2502,18 +2502,17 @@ dependencies = [ [[package]] name = "minify-html" -version = "0.15.0" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd4517942a8e7425c990b14977f86a63e4996eed7b15cfcca1540126ac5ff25" +checksum = "f0df760078ad1daa3e9a37629e1a5aa50ec0429ed512e567f18a1b5ec54cbbd5" dependencies = [ + "ahash 0.8.12", "aho-corasick 0.7.20", - "lazy_static", "lightningcss", "memchr", "minify-html-common", "minify-js", "once_cell", - "rustc-hash 1.1.0", ] [[package]] @@ -2533,10 +2532,11 @@ dependencies = [ [[package]] name = "minify-js" -version = "0.5.6" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22d6c512a82abddbbc13b70609cb2beff01be2c7afff534d6e5e1c85e438fc8b" +checksum = "b1fa5546ee8bd66024113e506cabe4230e76635a094c06ea2051b66021dda92e" dependencies = [ + "aho-corasick 0.7.20", "lazy_static", "parse-js", ] @@ -2891,9 +2891,9 @@ dependencies = [ [[package]] name = "parse-js" -version = "0.17.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec3b11d443640ec35165ee8f6f0559f1c6f41878d70330fe9187012b5935f02" +checksum = "2742b5e32dcb5930447ed9f9e401a7dfd883867fc079c4fac44ae8ba3593710e" dependencies = [ "aho-corasick 0.7.20", "bumpalo", diff --git a/Cargo.toml b/Cargo.toml index 7978065..c5199a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ metrics-exporter-prometheus = { version = "0.15.0", default-features = false, fe ] } metrics-util = "0.17.0" mime = "0.3.16" -minify-html = "0.15.0" +minify-html = "0.16.0" opentelemetry = "0.27.1" opentelemetry_sdk = { version = "0.27", features = ["rt-tokio"] } opentelemetry-otlp = { version = "0.27", features = ["grpc-tonic"] } diff --git a/src/routes/index.rs b/src/routes/index.rs index 0448208..ea2c54a 100644 --- a/src/routes/index.rs +++ b/src/routes/index.rs @@ -8,18 +8,19 @@ use rand::{seq::SliceRandom, thread_rng}; use std::io::BufWriter; const MINIFY_CONFIG: minify_html::Cfg = minify_html::Cfg { - do_not_minify_doctype: true, - ensure_spec_compliant_unquoted_attribute_values: true, + allow_noncompliant_unquoted_attribute_values: false, + allow_optimal_entities: false, + allow_removing_spaces_between_attributes: false, keep_closing_tags: true, - keep_html_and_head_opening_tags: false, - keep_spaces_between_attributes: true, keep_comments: false, + keep_html_and_head_opening_tags: false, keep_input_type_text_attr: true, keep_ssi_comments: false, - preserve_brace_template_syntax: false, - preserve_chevron_percent_template_syntax: false, + minify_doctype: false, minify_css: true, minify_js: true, + preserve_brace_template_syntax: false, + preserve_chevron_percent_template_syntax: false, remove_bangs: true, remove_processing_instructions: true, };