cloudflare/lol-html
Low output latency streaming HTML parser/rewriter with CSS selector-based API
20 Releases
Latest: 3w ago
v3.0.0Latest
📋 Changes
- Added `MemorySettings::with_graceful_bail_out_on_memory_limit_exceeded()`: when set, the
- Added `Settings::with_graceful_bail_out_on_content_handler_error()`: symmetric to the
- Added `Settings::append_bail_out_handler()` and the matching `bail_out!` macro,
- Marked `RewritingError` `#[non_exhaustive]` so future error variants can be added without
- Reworked `Settings`, `MemorySettings` and `RewriteStrSettings` to use a consuming-builder
- Renamed the internal-use feature `integration_test` to `_integration_test`. The leading
- `Comment::set_text` now also rejects `--!>`, a leading `>`, and a leading `->`, which
v2.9.0
📋 What's Changed
- Added `OutputSink::set_encoding` https://github.com/cloudflare/lol-html/pull/315
- Made `rewrite_str` ignore conflicting encodings https://github.com/cloudflare/lol-html/pull/316
- Added `name_source_location()` and `value_source_location()` to Attribute by @gmalette in https://github.com/cloudflare/lol-html/pull/313
✨ New Contributors
- @gmalette made their first contribution in https://github.com/cloudflare/lol-html/pull/313
- Full Changelog: https://github.com/cloudflare/lol-html/compare/v2.8.1...v2.9.0
v2.8.1
📋 What's Changed
- Added support for nested `:not()` with simple selectors. https://github.com/cloudflare/lol-html/pull/304
- Added `on_end_tag` convenience method https://github.com/cloudflare/lol-html/pull/308
- Reduced allocations in https://github.com/cloudflare/lol-html/pull/306 https://github.com/cloudflare/lol-html/pull/307 https://github.com/cloudflare/lol-html/pull/309
v2.7.2
📋 Changes
- Replaced several panicking assertions with gracefully reported errors, especially in the C API.
v2.7.1
📋 Changes
- Performance improvements.
- Updated dependencies.
v2.7.0
📋 Changes
- Improve type generation in js-api.
- Updated dependencies.
v2.6.0
📋 Changes
- Added source code locations to the C and JS APIs.
- Significant performance improvements and code size reductions.
v2.5.0
📋 Changes
- Source code locations for tags and other tokens.
- Document text chunks and escaping of attributes.
- Selector validation improvements.
v2.4.0
📋 Changes
- Upgraded `selectors` and `cssparser`.
v2.3.0
📋 Changes
- Added `element.onEndTag` to JS bindings.
- Refactored TextDecoder and token construction to avoid heap allocations.
- Added fast paths for UTF-8 rewrites.
v2.2.0
📋 Changes
- Updated cssparser and selectors dependencies
- Adopted `cargo-c` for building the C API
- Added WASM/JS API
- An invalid `/>` syntax will be removed when content is added to an HTML element
v2.1.0
📋 Changes
- Added streaming handlers.
- Only allow changing the charset once with the `<meta>` tag, in accordance with the HTML spec.
- Fixed parsing of invalid elements in `<svg>` and `<math>`.
v2.0.0
📋 Changes
- Added the ability for the rewriter to be [`Send`](https://doc.rust-lang.org/std/marker/trait.Send.html).
v1.1.1
🐛 Fixed
- Ensure that `TagScanner::is_in_end_tag` resets when changing parsers.
v1.1.0
📋 Changes
- Added ability to get the tag and attribute names with the original casing.
v1.0.1
🐛 Fixed
- The C API's new `lol_html_element_add_end_tag_handler()` function now sets the last error retrievable by `lol_html_take_last_error()` if it is called on an element that can have no end tag.
v1.0.0
✨ Added
- Added `Element::end_tag_handlers()` which allows better control over the end tag handlers.
📋 Changed
- Removed `Element::on_end_tag()` and `Element::add_on_end_tag()` in favor of the newly added
- `Element::end_tag_handlers()`.
v0.4.0
📋 Changes
- Added method `TextChunk::as_mut_str()` and `TextChunk::set_str()` for in-place modifications to the text in a
- Modified method `Element::on_end_tag()` to support multiple handlers. This is a breaking change since the old
v0.3.3
📋 Changes
- Support dynamic charset change on meta tags in HtmlRewriter. (#162)
- Add `Element::can_have_content`. (#163)
v0.2.0
