Repository: Y2Z/monolith
Pull request #348 (2024-01-14 16:32:17)

Update more crates


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index 1335e20..719ddfc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -93,15 +93,6 @@ dependencies = [
  "winapi",
 ]
 
-[[package]]
-name = "autocfg"
-version = "0.1.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78"
-dependencies = [
- "autocfg 1.1.0",
-]
-
 [[package]]
 name = "autocfg"
 version = "1.1.0"
@@ -224,15 +215,6 @@ dependencies = [
  "os_str_bytes",
 ]
 
-[[package]]
-name = "cloudabi"
-version = "0.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
-dependencies = [
- "bitflags",
-]
-
 [[package]]
 name = "codespan-reporting"
 version = "0.11.1"
@@ -296,7 +278,7 @@ dependencies = [
  "cssparser-macros",
  "dtoa-short",
  "itoa",
- "phf 0.10.1",
+ "phf",
  "smallvec",
 ]
 
@@ -455,12 +437,6 @@ dependencies = [
  "percent-encoding",
 ]
 
-[[package]]
-name = "fuchsia-cprng"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
-
 [[package]]
 name = "futf"
 version = "0.1.5"
@@ -576,9 +552,9 @@ dependencies = [
 
 [[package]]
 name = "html5ever"
-version = "0.24.1"
+version = "0.26.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "025483b0a1e4577bb28578318c886ee5f817dda6eb62473269349044406644cb"
+checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
 dependencies = [
  "log",
  "mac",
@@ -699,7 +675,7 @@ version = "1.9.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
 dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
  "hashbrown",
 ]
 
@@ -763,6 +739,16 @@ dependencies = [
  "cc",
 ]
 
+[[package]]
+name = "lock_api"
+version = "0.4.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
 [[package]]
 name = "log"
 version = "0.4.17"
@@ -780,21 +766,30 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
 
 [[package]]
 name = "markup5ever"
-version = "0.9.0"
+version = "0.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65381d9d47506b8592b97c4efd936afcf673b09b059f2bef39c7211ee78b9d03"
+checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
 dependencies = [
  "log",
- "phf 0.7.24",
+ "phf",
  "phf_codegen",
- "serde",
- "serde_derive",
- "serde_json",
  "string_cache",
  "string_cache_codegen",
  "tendril",
 ]
 
+[[package]]
+name = "markup5ever_rcdom"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9521dd6750f8e80ee6c53d65e2e4656d7de37064f3a7a5d2d11d05df93839c2"
+dependencies = [
+ "html5ever",
+ "markup5ever",
+ "tendril",
+ "xml5ever",
+]
+
 [[package]]
 name = "memchr"
 version = "2.7.1"
@@ -840,6 +835,7 @@ dependencies = [
  "cssparser",
  "encoding_rs",
  "html5ever",
+ "markup5ever_rcdom",
  "percent-encoding",
  "regex",
  "reqwest",
@@ -877,7 +873,7 @@ version = "0.2.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
 dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
 ]
 
 [[package]]
@@ -934,7 +930,7 @@ version = "0.9.77"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a"
 dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
  "cc",
  "libc",
  "pkg-config",
@@ -948,20 +944,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1"
 
 [[package]]
-name = "percent-encoding"
-version = "2.3.1"
+name = "parking_lot"
+version = "0.12.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
 
 [[package]]
-name = "phf"
-version = "0.7.24"
+name = "parking_lot_core"
+version = "0.9.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18"
+checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
 dependencies = [
- "phf_shared 0.7.24",
+ "cfg-if",
+ "libc",
+ "redox_syscall 0.4.1",
+ "smallvec",
+ "windows-targets 0.48.5",
 ]
 
+[[package]]
+name = "percent-encoding"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
 [[package]]
 name = "phf"
 version = "0.10.1"
@@ -969,28 +979,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
 dependencies = [
  "phf_macros",
- "phf_shared 0.10.0",
+ "phf_shared",
  "proc-macro-hack",
 ]
 
 [[package]]
 name = "phf_codegen"
-version = "0.7.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e"
-dependencies = [
- "phf_generator 0.7.24",
- "phf_shared 0.7.24",
-]
-
-[[package]]
-name = "phf_generator"
-version = "0.7.24"
+version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662"
+checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
 dependencies = [
- "phf_shared 0.7.24",
- "rand 0.6.5",
+ "phf_generator",
+ "phf_shared",
 ]
 
 [[package]]
@@ -999,8 +999,8 @@ version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
 dependencies = [
- "phf_shared 0.10.0",
- "rand 0.8.5",
+ "phf_shared",
+ "rand",
 ]
 
 [[package]]
@@ -1009,30 +1009,21 @@ version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0"
 dependencies = [
- "phf_generator 0.10.0",
- "phf_shared 0.10.0",
+ "phf_generator",
+ "phf_shared",
  "proc-macro-hack",
  "proc-macro2",
  "quote",
  "syn 1.0.103",
 ]
 
-[[package]]
-name = "phf_shared"
-version = "0.7.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0"
-dependencies = [
- "siphasher 0.2.3",
-]
-
 [[package]]
 name = "phf_shared"
 version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
 dependencies = [
- "siphasher 0.3.10",
+ "siphasher",
 ]
 
 [[package]]
@@ -1117,25 +1108,6 @@ dependencies = [
  "proc-macro2",
 ]
 
-[[package]]
-name = "rand"
-version = "0.6.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
-dependencies = [
- "autocfg 0.1.8",
- "libc",
- "rand_chacha 0.1.1",
- "rand_core 0.4.2",
- "rand_hc",
- "rand_isaac",
- "rand_jitter",
- "rand_os",
- "rand_pcg",
- "rand_xorshift",
- "winapi",
-]
-
 [[package]]
 name = "rand"
 version = "0.8.5"
@@ -1143,18 +1115,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
 dependencies = [
  "libc",
- "rand_chacha 0.3.1",
- "rand_core 0.6.4",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"
-dependencies = [
- "autocfg 0.1.8",
- "rand_core 0.3.1",
+ "rand_chacha",
+ "rand_core",
 ]
 
 [[package]]
@@ -1164,24 +1126,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
 dependencies = [
  "ppv-lite86",
- "rand_core 0.6.4",
+ "rand_core",
 ]
 
-[[package]]
-name = "rand_core"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
-dependencies = [
- "rand_core 0.4.2",
-]
-
-[[package]]
-name = "rand_core"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
-
 [[package]]
 name = "rand_core"
 version = "0.6.4"
@@ -1192,81 +1139,19 @@ dependencies = [
 ]
 
 [[package]]
-name = "rand_hc"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"
-dependencies = [
- "rand_core 0.3.1",
-]
-
-[[package]]
-name = "rand_isaac"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"
-dependencies = [
- "rand_core 0.3.1",
-]
-
-[[package]]
-name = "rand_jitter"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"
-dependencies = [
- "libc",
- "rand_core 0.4.2",
- "winapi",
-]
-
-[[package]]
-name = "rand_os"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
-dependencies = [
- "cloudabi",
- "fuchsia-cprng",
- "libc",
- "rand_core 0.4.2",
- "rdrand",
- "winapi",
-]
-
-[[package]]
-name = "rand_pcg"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
-dependencies = [
- "autocfg 0.1.8",
- "rand_core 0.4.2",
-]
-
-[[package]]
-name = "rand_xorshift"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"
-dependencies = [
- "rand_core 0.3.1",
-]
-
-[[package]]
-name = "rdrand"
-version = "0.4.0"
+name = "redox_syscall"
+version = "0.2.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
 dependencies = [
- "rand_core 0.3.1",
+ "bitflags",
 ]
 
 [[package]]
 name = "redox_syscall"
-version = "0.2.16"
+version = "0.4.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
 dependencies = [
  "bitflags",
 ]
@@ -1371,6 +1256,12 @@ dependencies = [
  "windows-sys 0.36.1",
 ]
 
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
 [[package]]
 name = "scratch"
 version = "1.0.2"
@@ -1406,17 +1297,6 @@ version = "1.0.147"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965"
 
-[[package]]
-name = "serde_derive"
-version = "1.0.195"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.48",
-]
-
 [[package]]
 name = "serde_json"
 version = "1.0.87"
@@ -1451,12 +1331,6 @@ dependencies = [
  "digest",
 ]
 
-[[package]]
-name = "siphasher"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac"
-
 [[package]]
 name = "siphasher"
 version = "0.3.10"
@@ -1469,7 +1343,7 @@ version = "0.4.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
 dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
 ]
 
 [[package]]
@@ -1490,38 +1364,30 @@ dependencies = [
 
 [[package]]
 name = "string_cache"
-version = "0.7.5"
+version = "0.8.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89c058a82f9fd69b1becf8c274f412281038877c553182f1d02eb027045a2d67"
+checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
 dependencies = [
- "lazy_static",
  "new_debug_unreachable",
- "phf_shared 0.7.24",
+ "once_cell",
+ "parking_lot",
+ "phf_shared",
  "precomputed-hash",
  "serde",
- "string_cache_codegen",
- "string_cache_shared",
 ]
 
 [[package]]
 name = "string_cache_codegen"
-version = "0.4.4"
+version = "0.5.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6"
+checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
 dependencies = [
- "phf_generator 0.7.24",
- "phf_shared 0.7.24",
+ "phf_generator",
+ "phf_shared",
  "proc-macro2",
  "quote",
- "string_cache_shared",
 ]
 
-[[package]]
-name = "string_cache_shared"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc"
-
 [[package]]
 name = "strsim"
 version = "0.10.0"
@@ -1580,7 +1446,7 @@ dependencies = [
  "cfg-if",
  "fastrand",
  "libc",
- "redox_syscall",
+ "redox_syscall 0.2.16",
  "remove_dir_all",
  "winapi",
 ]
@@ -1638,7 +1504,7 @@ version = "1.26.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64"
 dependencies = [
- "autocfg 1.1.0",
+ "autocfg",
  "bytes",
  "libc",
  "memchr",
@@ -2098,3 +1964,14 @@ dependencies = [
  "cfg-if",
  "windows-sys 0.48.0",
 ]
+
+[[package]]
+name = "xml5ever"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4034e1d05af98b51ad7214527730626f019682d797ba38b51689212118d8e650"
+dependencies = [
+ "log",
+ "mac",
+ "markup5ever",
+]
diff --git a/Cargo.toml b/Cargo.toml
index 13c121e..ac51612 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,7 +28,8 @@ chrono = "0.4.31"  # Used for formatting creation timestamp
 clap = "3.2.25"  # Used for processing CLI arguments
 cssparser = "0.33.0"  # Used for dealing with CSS
 encoding_rs = "0.8.33"  # Used for parsing and converting document charsets
-html5ever = "0.24.1"  # Used for all things DOM
+html5ever = "0.26.0"  # Used for all things DOM
+markup5ever_rcdom = "0.2.0"
 percent-encoding = "2.3.1"
 sha2 = "0.10.8"  # Used for calculating checksums during integrity checks
 url = "2.5.0"
diff --git a/src/html.rs b/src/html.rs
index c7d2423..7cf29e9 100644
--- a/src/html.rs
+++ b/src/html.rs
@@ -3,11 +3,11 @@ use chrono::prelude::*;
 use encoding_rs::Encoding;
 use html5ever::interface::QualName;
 use html5ever::parse_document;
-use html5ever::rcdom::{Handle, NodeData, RcDom};
 use html5ever::serialize::{serialize, SerializeOpts};
 use html5ever::tendril::{format_tendril, TendrilSink};
 use html5ever::tree_builder::{Attribute, TreeSink};
 use html5ever::{local_name, namespace_url, ns, LocalName};
+use markup5ever_rcdom::{Handle, NodeData, RcDom, SerializableHandle};
 use regex::Regex;
 use reqwest::blocking::Client;
 use reqwest::Url;
@@ -32,8 +32,12 @@ const ICON_VALUES: &'static [&str] = &["icon", "shortcut icon"];
 
 pub fn add_favicon(document: &Handle, favicon_data_url: String) -> RcDom {
     let mut buf: Vec<u8> = Vec::new();
-    serialize(&mut buf, document, SerializeOpts::default())
-        .expect("unable to serialize DOM into buffer");
+    serialize(
+        &mut buf,
+        &SerializableHandle::from(document.clone()),
+        SerializeOpts::default(),
+    )
+    .expect("unable to serialize DOM into buffer");
 
     let mut dom = html_to_dom(&buf, "utf-8".to_string());
     let doc = dom.get_document();
@@ -428,8 +432,12 @@ pub fn is_icon(attr_value: &str) -> bool {
 
 pub fn set_base_url(document: &Handle, desired_base_href: String) -> RcDom {
     let mut buf: Vec<u8> = Vec::new();
-    serialize(&mut buf, document, SerializeOpts::default())
-        .expect("unable to serialize DOM into buffer");
+    serialize(
+        &mut buf,
+        &SerializableHandle::from(document.clone()),
+        SerializeOpts::default(),
+    )
+    .expect("unable to serialize DOM into buffer");
 
     let mut dom = html_to_dom(&buf, "utf-8".to_string());
     let doc = dom.get_document();
@@ -534,7 +542,7 @@ pub fn set_node_attr(node: &Handle, attr_name: &str, attr_value: Option<String>)
 
 pub fn serialize_document(mut dom: RcDom, document_encoding: String, options: &Options) -> Vec<u8> {
     let mut buf: Vec<u8> = Vec::new();
-    let doc = dom.get_document();
+    let document = dom.get_document();
 
     if options.isolate
         || options.no_css
@@ -544,7 +552,7 @@ pub fn serialize_document(mut dom: RcDom, document_encoding: String, options: &O
         || options.no_images
     {
         // Take care of CSP
-        if let Some(html) = get_child_node_by_name(&doc, "html") {
+        if let Some(html) = get_child_node_by_name(&document, "html") {
             if let Some(head) = get_child_node_by_name(&html, "head") {
                 let meta = dom.create_element(
                     QualName::new(None, ns!(), local_name!("meta")),
@@ -570,8 +578,12 @@ pub fn serialize_document(mut dom: RcDom, document_encoding: String, options: &O
         }
     }
 
-    serialize(&mut buf, &doc, SerializeOpts::default())
-        .expect("Unable to serialize DOM into buffer");
+    serialize(
+        &mut buf,
+        &SerializableHandle::from(document.clone()),
+        SerializeOpts::default(),
+    )
+    .expect("Unable to serialize DOM into buffer");
 
     // Unwrap NOSCRIPT elements
     if options.unwrap_noscript {
@@ -660,7 +672,7 @@ pub fn retrieve_and_embed_asset(
                     let mut frame_data: Vec<u8> = Vec::new();
                     serialize(
                         &mut frame_data,
-                        &frame_dom.document,
+                        &SerializableHandle::from(frame_dom.document.clone()),
                         SerializeOpts::default(),
                     )
                     .unwrap();
@@ -1198,8 +1210,12 @@ pub fn walk_and_embed_assets(
                                 {
                                     if let Some(body) = get_child_node_by_name(&html, "body") {
                                         let mut buf: Vec<u8> = Vec::new();
-                                        serialize(&mut buf, &body, SerializeOpts::default())
-                                            .expect("Unable to serialize DOM into buffer");
+                                        serialize(
+                                            &mut buf,
+                                            &SerializableHandle::from(body.clone()),
+                                            SerializeOpts::default(),
+                                        )
+                                        .expect("Unable to serialize DOM into buffer");
                                         let result = String::from_utf8_lossy(&buf);
                                         noscript_contents.push_slice(&result);
                                     }
diff --git a/src/main.rs b/src/main.rs
index fdd2359..c484f15 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,5 @@
 use encoding_rs::Encoding;
-use html5ever::rcdom::RcDom;
+use markup5ever_rcdom::RcDom;
 use reqwest::blocking::Client;
 use reqwest::header::{HeaderMap, HeaderValue, USER_AGENT};
 use std::collections::HashMap;


Test patch:
diff --git a/tests/html/add_favicon.rs b/tests/html/add_favicon.rs
index a276aca..02ab865 100644
--- a/tests/html/add_favicon.rs
+++ b/tests/html/add_favicon.rs
@@ -8,6 +8,7 @@
 #[cfg(test)]
 mod passing {
     use html5ever::serialize::{serialize, SerializeOpts};
+    use markup5ever_rcdom::SerializableHandle;
 
     use monolith::html;
 
@@ -19,7 +20,12 @@ mod passing {
         dom = html::add_favicon(&dom.document, "I_AM_A_FAVICON_DATA_URL".to_string());
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
diff --git a/tests/html/get_node_attr.rs b/tests/html/get_node_attr.rs
index 2be351c..e0dcd9f 100644
--- a/tests/html/get_node_attr.rs
+++ b/tests/html/get_node_attr.rs
@@ -7,7 +7,7 @@
 
 #[cfg(test)]
 mod passing {
-    use html5ever::rcdom::{Handle, NodeData};
+    use markup5ever_rcdom::{Handle, NodeData};
 
     use monolith::html;
 
diff --git a/tests/html/get_node_name.rs b/tests/html/get_node_name.rs
index 7019206..ed79bec 100644
--- a/tests/html/get_node_name.rs
+++ b/tests/html/get_node_name.rs
@@ -7,7 +7,7 @@
 
 #[cfg(test)]
 mod passing {
-    use html5ever::rcdom::{Handle, NodeData};
+    use markup5ever_rcdom::{Handle, NodeData};
 
     use monolith::html;
 
diff --git a/tests/html/set_node_attr.rs b/tests/html/set_node_attr.rs
index 120e44d..114de70 100644
--- a/tests/html/set_node_attr.rs
+++ b/tests/html/set_node_attr.rs
@@ -7,7 +7,7 @@
 
 #[cfg(test)]
 mod passing {
-    use html5ever::rcdom::{Handle, NodeData};
+    use markup5ever_rcdom::{Handle, NodeData};
 
     use monolith::html;
 
diff --git a/tests/html/walk_and_embed_assets.rs b/tests/html/walk_and_embed_assets.rs
index 5db25a5..c7643c8 100644
--- a/tests/html/walk_and_embed_assets.rs
+++ b/tests/html/walk_and_embed_assets.rs
@@ -8,6 +8,7 @@
 #[cfg(test)]
 mod passing {
     use html5ever::serialize::{serialize, SerializeOpts};
+    use markup5ever_rcdom::SerializableHandle;
     use reqwest::blocking::Client;
     use std::collections::HashMap;
     use url::Url;
@@ -32,7 +33,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -55,7 +61,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -78,7 +89,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -107,7 +123,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -143,7 +164,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -180,7 +206,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -204,7 +235,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -236,7 +272,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -272,7 +313,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -306,7 +352,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -343,7 +394,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -381,7 +437,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -427,7 +488,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -466,7 +532,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),
@@ -501,7 +572,12 @@ mod passing {
         html::walk_and_embed_assets(cache, &client, &url, &dom.document, &options, 0);
 
         let mut buf: Vec<u8> = Vec::new();
-        serialize(&mut buf, &dom.document, SerializeOpts::default()).unwrap();
+        serialize(
+            &mut buf,
+            &SerializableHandle::from(dom.document.clone()),
+            SerializeOpts::default(),
+        )
+        .unwrap();
 
         assert_eq!(
             buf.iter().map(|&c| c as char).collect::<String>(),