Skip to content

Commit

Permalink
Remove escape-html feature and the resolve_html5_entity function
Browse files Browse the repository at this point in the history
Because since #739 custom entity resolution function have precedence over standard one,
so user can implement resolution of HTML entities by yourself.
  • Loading branch information
Mingun committed Jun 21, 2024
1 parent a85cab7 commit 1cbed72
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 1,710 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ jobs:
env:
LLVM_PROFILE_FILE: coverage/serialize-encoding-%p-%m.profraw
run: cargo test --features serialize,encoding
- name: Run tests (serialize+escape-html)
env:
LLVM_PROFILE_FILE: coverage/serialize-escape-html-%p-%m.profraw
run: cargo test --features serialize,escape-html
- name: Run tests (all features)
env:
LLVM_PROFILE_FILE: coverage/all-features-%p-%m.profraw
Expand Down
10 changes: 1 addition & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
documentation = "https://docs.rs/quick-xml"
repository = "https://github.com/tafia/quick-xml"

keywords = ["xml", "serde", "parser", "writer", "html"]
keywords = ["xml", "serde", "parser", "writer"]
categories = ["asynchronous", "encoding", "parsing", "parser-implementations"]
license = "MIT"
rust-version = "1.56"
Expand Down Expand Up @@ -111,14 +111,6 @@ async-tokio = ["tokio"]
## [#158]: https://github.com/tafia/quick-xml/issues/158
encoding = ["encoding_rs"]

## Enables support for recognizing all [HTML 5 entities] in [`unescape`]
## function. The full list of entities also can be found in
## <https://html.spec.whatwg.org/entities.json>.
##
## [HTML 5 entities]: https://dev.w3.org/html5/html-author/charref
## [`unescape`]: crate::escape::unescape
escape-html = []

## This feature is for the Serde deserializer that enables support for deserializing
## lists where tags are overlapped with tags that do not correspond to the list.
##
Expand Down
12 changes: 8 additions & 4 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

## Unreleased

The feature `escape-html` was removed. Since [#739] custom entity resolution function
have precedence over standard one, so that user can implement resolution of HTML entities
by yourself.

### New Features

- [#758]: Implemented `From<QName>` for `BytesStart` and `BytesEnd`.
Expand All @@ -23,9 +27,7 @@

- [#650]: Change the type of `Event::PI` to a new dedicated `BytesPI` type.
- [#759]: Make `const` as much functions as possible:
- `resolve_html5_entity()`
- `resolve_predefined_entity()`
- `resolve_xml_entity()`
- `Attr::key()`
- `Attr::value()`
- `Attributes::html()`
Expand All @@ -48,10 +50,12 @@
- `SliceReader::get_ref()`
- `Writer::get_ref()`
- `Writer::new()`
- [#763]: Hide `quick_xml::escape::resolve_html5_entity` under `escape-html` feature again.
This function has significant influence to the compilation time (10+ seconds or 5x times)
- [#763]: Remove `escape-html` feature and the following functions dependent on it:
- `resolve_html5_entity()` (this function had a significant impact to the compilation time (10+ seconds or 5x times))
- `resolve_xml_entity()` (now `resolve_predefined_entity()` is equal to this one)

[#650]: https://github.com/tafia/quick-xml/issues/650
[#739]: https://github.com/tafia/quick-xml/pull/739
[#755]: https://github.com/tafia/quick-xml/pull/755
[#758]: https://github.com/tafia/quick-xml/pull/758
[#759]: https://github.com/tafia/quick-xml/pull/759
Expand Down
Loading

0 comments on commit 1cbed72

Please sign in to comment.