nx_html_extract_links.nx
buildroot/runtime/nx_html_extract_links.nx
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
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
| 33 | func _link_name_eq_a(src: *u8, name_off: i64, name_len: i64) -> i64 called by 1: nx_html_extract_links |
| 41 | func nx_html_extract_links(html: *u8, html_len: i64, |