hyper_render_html 1.3.4 copy "hyper_render_html: ^1.3.4" to clipboard
hyper_render_html: ^1.3.4 copied to clipboard

HTML parsing plugin for HyperRender. Converts HTML content to UDT with full CSS support.

Changelog โ€” hyper_render_html #

1.3.4 - 2026-06-04 #

๐Ÿ—๏ธ Maintenance #

  • Updated hyper_render_core dependency to ^1.3.4

1.3.3 - 2026-06-04 #

โœจ New CSS Features #

  • CSS Attribute Selectors: Added full support for attribute selectors in CSS parsing and matching rules:
    • Presence: [attr]
    • Exact match: [attr="value"]
    • Starts with prefix: [attr^="value"]
    • Ends with suffix: [attr$="value"]
    • Substring match: [attr*="value"]
    • Whitespace-separated word: [attr~="value"]
    • Hyphen-separated prefix: [attr|="value"]

๐Ÿ—๏ธ Maintenance #

  • Updated hyper_render_core dependency to ^1.3.3

1.3.2 - 2026-05-19 #

๐Ÿ”’ Security #

  • HtmlAdapter URL scheme gate (defence-in-depth) โ€” <img src> and <a href> are now routed through UrlSafety.isSafe (from hyper_render_core) after _resolveUrl runs. Even when callers bypass HtmlSanitizer (calling HtmlAdapter().parse(...) directly, or rendering with sanitize: false), javascript:, vbscript:, file:, mhtml:, about:, data:image/svg, and control-character smuggling variants now collapse to inert # (links) or '' (images). Mirrors the same gate the Markdown and Delta adapters already applied.

๐Ÿš€ Performance #

  • HtmlAdapter.extractCss regex fast-path โ€” for inputs โ‰ฅ 32 KB or with no <style tag at all (the common Markdown/Delta case), extractCss skips the full html5lib parse on the UI thread and uses a focused regex. Saves 50โ€“300 ms on a 200 KB document on a mid-range Android, eliminating the synchronous parse stall that occurred on every initial render. Small inputs continue to use the full DOM parser for fidelity.

๐Ÿงช Tests #

  • +29 tests added across html_url_safety_test, css_parser_test, extract_css_perf_test. Covers scheme blocklist, smuggling, multiple <style> blocks, case-insensitive matching, fast-path threshold behaviour, comma/class/id selectors, keyframes round-trip.

1.3.1 - 2026-05-14 #

๐Ÿ—๏ธ Maintenance #

  • Updated hyper_render_core dependency to ^1.3.1

1.3.0 - 2026-05-03 #

โœจ New Features #

  • HTML tag coverage: Full support for h4โ€“h6, section, article, main, aside, header, footer, nav, figure, figcaption, dl/dt/dd, summary, u, s, del, ins, small, q, cite, abbr, time, sup, sub, var, kbd, samp, bdi, bdo, dfn, wbr
  • display: none: Elements with display: none are now correctly skipped โ€” no more [edit] links leaking from Wikipedia-style HTML
  • <pre> / code blocks: Inline code and code blocks now render via CodeBlockWidget
  • <hr>: Renders as a styled BlockNode with a border instead of a LineBreakNode
  • CSS Grid: display: grid with row/column track sizing, gap, and span support
  • RTL/BiDi: direction: rtl for Arabic, Hebrew, and Persian content

๐Ÿ› Bug Fixes #

  • Whitespace preservation: Whitespace-only text nodes between inline elements no longer dropped โ€” fixes missing spaces between <span> siblings
  • appendChild for top-level nodes: Fixed parent reference not being set for top-level nodes added to the document root
  • Shared ComputedStyle mutation: _defaultStyles map now returns .copyWith() copies โ€” prevents cross-node style bleed
  • Link XSS: javascript:, vbscript:, and data: hrefs are sanitized and blocked
  • <details>/<summary>: Fixed double-render issue on expanded details elements
  • @override analyzer warning: parseKeyframes() no longer carries @override annotation โ€” flutter analyze reports 0 issues
  • CSS float class detection: _containsFloatChild now detects Bootstrap/Tailwind float class patterns

๐Ÿ”ฌ Tests #

  • Added regression tests for display:none, <pre>, whitespace handling

1.2.0 - 2026-03-30 #

  • Initial release: HTML โ†’ UDT adapter with CSS float, Flexbox, table colspan/rowspan, ruby, XSS sanitization
5
likes
160
points
302
downloads

Documentation

API reference

Publisher

verified publisherbrewkits.dev

Weekly Downloads

HTML parsing plugin for HyperRender. Converts HTML content to UDT with full CSS support.

Homepage
Repository (GitHub)
View/report issues

Topics

#flutter #html-renderer #html-parser #css #xss-sanitization

License

MIT (license)

Dependencies

csslib, flutter, html, hyper_render_core

More

Packages that depend on hyper_render_html