diff --git a/README.md b/README.md index a479ab7..170227d 100644 --- a/README.md +++ b/README.md @@ -479,7 +479,7 @@ However, there are some syntax requirements for speed and sanity. ### Tags -Tags must not be [omitted](https://html.spec.whatwg.org/multipage/syntax.html#syntax-tag-omission). Void tags must not have a separate closing tag e.g. ``. +Opening tags must not be [omitted](https://html.spec.whatwg.org/multipage/syntax.html#syntax-tag-omission). ### Entities @@ -495,8 +495,6 @@ Numeric character references that do not reference a valid [Unicode Scalar Value ### Script and style -`script` and `style` tags must be closed with `", b""); eval(b"", b""); // Tag and attribute names should be case insensitive. - eval(b"", b""); + eval(b"", b""); } #[test] @@ -326,5 +326,5 @@ fn test_js_minification() { "#, b""); - eval_with_js_min(b"", b""); + eval_with_js_min(b"", b""); } diff --git a/src/unit/script.rs b/src/unit/script.rs index b50ed1a..d123830 100644 --- a/src/unit/script.rs +++ b/src/unit/script.rs @@ -1,4 +1,4 @@ -use aho_corasick::AhoCorasick; +use aho_corasick::{AhoCorasick, AhoCorasickBuilder}; use lazy_static::lazy_static; use crate::cfg::Cfg; use crate::err::ProcessingResult; @@ -25,7 +25,7 @@ lazy_static! { } lazy_static! { - static ref SCRIPT_END: AhoCorasick = AhoCorasick::new(&["