code wiki / (root) / nx_html_extract_links.nx

nx_html_extract_links.nx

buildroot/runtime/nx_html_extract_links.nx

4104 B95 linesdepth 3pulls 5 transitivereach 3 importersview sourcekind librarytopic html
docsdependenciesstructsconstsfunctions

about

nx_html_extract_links.nx -- enumerate <a href="..."> links in a parsed HTML document, resolving each href against the page base URL. Arc B2 sibling of nx_html_extract_imgs. Same shape, same guarantees: - script/style/textarea/title raw-text bodies are SKIPPED so they can't pollute the extracted list with literal "<a" tokens-inside- strings - URL resolution is RFC 3986 ยง5.2 via nx_url_resolve - caller-supplied flat URL buffer + parallel (offset, length) arrays; substrate-honest truncation This is the primitive the bits-up browser uses to discover navigation targets in a fetched page. nx_safety_envelope: intended_use: "Anchor-link enumeration for the bits-up browser." sil_target: SIL1 evidence: [composes_b1_raw_text_mode, composes_rfc3986_url_resolver] hazard_register: [bug-tape-javascript-url-bypass-via-href, bug-tape-data-url-bypass-via-href] residual_risk: "Caller is responsible for scheme-allowlisting (e.g. reject javascript:, data:, file:); substrate emits absolute URLs verbatim." verdict: NOT_YET_EVALUATED

dependencies 4 imports · 3 importers

nx_syscalls.nx nx_html_tokenizer.nx nx_dom_query.nx nx_url_resolve.nx nx_html_extract_links.nx nishi.nx nx_entity_seeds.nx nx_navigation_test.nx

imports: nx_syscalls.nxnx_html_tokenizer.nxnx_dom_query.nxnx_url_resolve.nx

imported by: nishi.nxnx_entity_seeds.nxnx_navigation_test.nx

structs

none

consts

none

functions