From cc4a22e024a23183e53696bf6dc5014e407a29ff Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Thu, 23 Dec 2021 13:37:43 +0000 Subject: [PATCH] Bug 1747394 - Check for space-like bytes instead of just space after a copyright sign. r=dminor Differential Revision: https://phabricator.services.mozilla.com/D134609 --- .cargo/config.in | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- third_party/rust/chardetng/.cargo-checksum.json | 2 +- third_party/rust/chardetng/src/lib.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.cargo/config.in b/.cargo/config.in index 6b01a84c6874..3b5e0bc1b91d 100644 --- a/.cargo/config.in +++ b/.cargo/config.in @@ -84,7 +84,7 @@ rev = "ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" [source."https://github.com/hsivonen/chardetng"] git = "https://github.com/hsivonen/chardetng" replace-with = "vendored-sources" -rev = "cb8052aaf9c4bca3bea4a579667441cc3ba7537c" +rev = "3484d3e3ebdc8931493aa5df4d7ee9360a90e76b" [source."https://github.com/grovesNL/glow"] git = "https://github.com/grovesNL/glow" diff --git a/Cargo.lock b/Cargo.lock index 12fd501138a9..1cbcf414e3ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -678,7 +678,7 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chardetng" version = "0.1.9" -source = "git+https://github.com/hsivonen/chardetng?rev=cb8052aaf9c4bca3bea4a579667441cc3ba7537c#cb8052aaf9c4bca3bea4a579667441cc3ba7537c" +source = "git+https://github.com/hsivonen/chardetng?rev=3484d3e3ebdc8931493aa5df4d7ee9360a90e76b#3484d3e3ebdc8931493aa5df4d7ee9360a90e76b" dependencies = [ "encoding_rs", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 48f9cfbb858a..4695634e24a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,7 +97,7 @@ wasm-bindgen = { git = "https://github.com/kvark/dummy-web" } web-sys = { git = "https://github.com/kvark/dummy-web" } # Other overrides -chardetng = { git = "https://github.com/hsivonen/chardetng", rev="cb8052aaf9c4bca3bea4a579667441cc3ba7537c" } +chardetng = { git = "https://github.com/hsivonen/chardetng", rev="3484d3e3ebdc8931493aa5df4d7ee9360a90e76b" } chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" } libudev-sys = { path = "dom/webauthn/libudev-sys" } packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="8b4bd7d8229660a749dbe419a57ea01df9de5453" } diff --git a/third_party/rust/chardetng/.cargo-checksum.json b/third_party/rust/chardetng/.cargo-checksum.json index 2b11e80c0a7f..79815e23ab2d 100644 --- a/third_party/rust/chardetng/.cargo-checksum.json +++ b/third_party/rust/chardetng/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CONTRIBUTING.md":"0e64fb3dd5a00e3fd528de6442de3f2ca851bd718c45cca0871aaf4eedac9ee1","COPYRIGHT":"2fd0d7e90bd241b79804de129c5b70089988f82a7bbb0fe580a55b67b2968928","Cargo.toml":"ab767659696eb10dbaab743b566910bd29fc8f8f6998d9580494397a8903bd34","LICENSE-APACHE":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","LICENSE-MIT":"4ad721b5b6a3d39ca3e2202f403d897c4a1d42896486dd58963a81f8e64ef61d","README.md":"a6c97d91989aee4c8afed918340ce6287652cbdd6fed833e20f76367c7953db9","src/data.rs":"be48f1486ef9fc264f6cda2e10944b7dcf8ed0a904b53227340a1384803796c7","src/lib.rs":"8c632df34c983e90edc814233abb6a7e79ea76d56e6e8874f8d33379057edf63","src/tld.rs":"295c3c90c60c5bb6edd753b77c261eed10be2d431badda4e02168e740a0f2d7e"},"package":null} \ No newline at end of file +{"files":{"CONTRIBUTING.md":"0e64fb3dd5a00e3fd528de6442de3f2ca851bd718c45cca0871aaf4eedac9ee1","COPYRIGHT":"2fd0d7e90bd241b79804de129c5b70089988f82a7bbb0fe580a55b67b2968928","Cargo.toml":"ab767659696eb10dbaab743b566910bd29fc8f8f6998d9580494397a8903bd34","LICENSE-APACHE":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","LICENSE-MIT":"4ad721b5b6a3d39ca3e2202f403d897c4a1d42896486dd58963a81f8e64ef61d","README.md":"a6c97d91989aee4c8afed918340ce6287652cbdd6fed833e20f76367c7953db9","src/data.rs":"be48f1486ef9fc264f6cda2e10944b7dcf8ed0a904b53227340a1384803796c7","src/lib.rs":"16c7c78a56ec917e92db97263f4adddcf3749acaf7de88d088d1f5c86c278107","src/tld.rs":"295c3c90c60c5bb6edd753b77c261eed10be2d431badda4e02168e740a0f2d7e"},"package":null} \ No newline at end of file diff --git a/third_party/rust/chardetng/src/lib.rs b/third_party/rust/chardetng/src/lib.rs index 0f6e2366ebe2..c19d81d94328 100644 --- a/third_party/rust/chardetng/src/lib.rs +++ b/third_party/rust/chardetng/src/lib.rs @@ -593,7 +593,7 @@ impl LatinCandidate { } } OrdinalState::Copyright => { - if b == b' ' { + if caseless_class == 0 { score += COPYRIGHT_BONUS; self.ordinal_state = OrdinalState::Space; } else {