hyper_render_html 1.3.4
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.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"]
- Presence:
๐๏ธ Maintenance #
- Updated
hyper_render_coredependency to^1.3.3
1.3.2 - 2026-05-19 #
๐ Security #
HtmlAdapterURL scheme gate (defence-in-depth) โ<img src>and<a href>are now routed throughUrlSafety.isSafe(fromhyper_render_core) after_resolveUrlruns. Even when callers bypassHtmlSanitizer(callingHtmlAdapter().parse(...)directly, or rendering withsanitize: 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.extractCssregex fast-path โ for inputs โฅ 32 KB or with no<styletag at all (the common Markdown/Delta case),extractCssskips 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.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 withdisplay: noneare now correctly skipped โ no more[edit]links leaking from Wikipedia-style HTML<pre>/ code blocks: Inline code and code blocks now render viaCodeBlockWidget<hr>: Renders as a styledBlockNodewith a border instead of aLineBreakNode- CSS Grid:
display: gridwith row/column track sizing,gap, and span support - RTL/BiDi:
direction: rtlfor 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 appendChildfor top-level nodes: Fixed parent reference not being set for top-level nodes added to the document root- Shared
ComputedStylemutation:_defaultStylesmap now returns.copyWith()copies โ prevents cross-node style bleed - Link XSS:
javascript:,vbscript:, anddata:hrefs are sanitized and blocked <details>/<summary>: Fixed double-render issue on expanded details elements@overrideanalyzer warning:parseKeyframes()no longer carries@overrideannotation โflutter analyzereports 0 issues- CSS float class detection:
_containsFloatChildnow 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