FLUTTER ECOSYSTEM

html_unescape

A small library for un-escaping HTML. Supports all Named Character References, Decimal Character References and Hexadecimal Character References.

Latest version
2.0.0
30-day downloads
354K
Likes
181
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

A lightweight Flutter/Dart package for decoding HTML entities, including named, decimal, and hexadecimal character references. It safely converts escaped HTML text back to its original form, making it ideal for rendering content from web sources or user input. The library is efficient, minimal, and designed specifically for use in Dart applications across multiple platforms.

Use cases
  • Rendering HTML-encoded text in UI
  • Processing user-generated content
  • Parsing data from web APIs
  • Displaying formatted text from CMS
  • Sanitizing input before display
Key features
  • Supports all HTML entity types
  • Lightweight and fast
  • Cross-platform compatibility
  • Simple API with clear methods
  • No external dependencies
Suitable for
  • Apps handling raw HTML strings
  • Content rendering apps
  • Web scraping utilities
  • Text processing tools
  • Educational or documentation apps
Considerations
  • Does not parse full HTML documents
  • Not suitable for XSS protection
  • Requires manual sanitization of unescaped content
  • Limited to character reference decoding
  • Not intended for complex HTML manipulation
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add html_unescape

Categories

Source repository

Related projects

Rankings