Documentation
¶
Overview ¶
Package urlutil provides URL resolution and sanitization for extracted content.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractBaseHref ¶
ExtractBaseHref finds the <base href="..."> value from the document.
func ResolveRelativeURLs ¶
ResolveRelativeURLs resolves all relative URLs in the element against baseURL. It handles href, src, srcset, poster, and data-src attributes. docBaseHref overrides the base URL if a <base href> tag was present.
func SanitizeUnsafe ¶
SanitizeUnsafe strips dangerous elements, event handlers, and unsafe URLs from the extracted content to prevent XSS when the HTML is rendered.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.