html_unescape
2.0.0, released 6 years ago by filiph.net
Un-escapes HTML-encoded strings supporting named, decimal, and hexadecimal character references.
WASM-ready
What it does
A Dart library for unescaping HTML-encoded strings. It supports all Named Character References, Decimal Character References, and Hexadecimal Character References.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to decode HTML entities in text scraped from the web or fetched from APIs.
- You want to process streams of data containing HTML-escaped characters.
Skip it when
- You only need to escape HTML characters instead of decoding them.
- You are looking for an HTML parser or DOM manipulation library.
Strengths
- Supports over 2000 named character references as well as decimal and hexadecimal references.
- Offers a small version for reduced code size and increased performance if only common characters are needed.
- Can be used as a stream transformer.
Weaknesses
- Limited to unescaping HTML and does not provide general HTML parsing or DOM creation features.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:html_unescape/html_unescape.dart';
main() {
var unescape = HtmlUnescape();
var text = unescape.convert("<strong>This "escaped" string");
print(text);
}Alternatives
Packages that do the same job and could replace html_unescape.
Works with
Packages commonly used together with html_unescape: ones it builds on, ones built on it, and its own family.
- vsc_quill_delta_to_htmlBuilt on html_unescapeConverts Quill's Delta format to HTML.
- jinjaBuilt on html_unescapeJinja2 template engine port for Dart supporting variables, control structures, and template inheritance.
- matrixBuilt on html_unescapeMatrix (matrix.org) SDK written in Dart.
- liquifyBuilt on html_unescapeA powerful and extensible Liquid template engine for Dart.
- finchBuilt on html_unescapeA lightweight Dart framework for building server‑side web apps, APIs, databases and WebSockets.
- contentful_rich_textBuilt on html_unescapeRenders Contentful Rich Text JSON into a Flutter widget tree.
- google_sign_in_dartioBuilt on html_unescapePure‑Dart Google Sign‑In for Flutter, usable on mobile and desktop.
- bones_uiBuilt on html_unescapeAn intuitive and user-friendly Web User Interface framework for Dart.