Rust crate to encode and decode HTML entities in UTF-8 according to the standard
APACHE-2.0 License
Bot releases are visible (Hide)
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
unescape
feature but not unescape_fast
. Added tests for--all-features
— to the CI checkPublished by github-actions[bot] over 1 year ago
unescape
and entities
features.Published by github-actions[bot] over 1 year ago
unescape()
behind unescape
feature. This allows users to avoid theENTITIES
behind entities
features for the same reason I added theunescape
feature. Note that the unescape
feature automatically enablesentities
feature, but unescape_faster
does not.Cow<'a, str>
for inputunescape_faster
feature for even faster unescaping at the cost ofunescape_attribute()
to handle the special rules for dealing withunescape_in()
, whichContext::Attribute
orContext::General
(for everything else).unescape_bytes_in()
to work on [u8]
rather than str
.escape_..._bytes()
functions to work on [u8]
rather than str
.phf_map!
macro.ENTITIES
to indicate that it’s a Map
, not justunescape()
incorrectly outputted the replacement character (U+FFFD “�”) for
certain numeric entities:
0x0D
(carriage return)A close reading of the spec and some browser testing shows that behavior to
be incorrect. Those characters are now outputted as themselves.
unescape()
incorrectly outputted long numeric entities as the literal text
of the entity.
A close reading of the spec and some browser testing shows that behavior to
be incorrect. Those long entities are now outputted as the replacement
character (U+FFFD “�”).
Published by danielparks almost 2 years ago
Published by danielparks almost 2 years ago
Remove private macros from docs, rename function, and expand README.