htmlpolicy

package
v0.0.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package htmlpolicy implements the closed margo-html-v1 fragment profile.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize added in v0.0.5

func Normalize(fragment []byte) ([]byte, error)

Normalize parses, validates, and serializes a fresh canonical fragment. It never returns the caller's original HTML bytes.

func NormalizeTokens added in v0.0.5

func NormalizeTokens(fragment []byte) ([]byte, error)

NormalizeTokens canonicalizes a Goldmark raw-HTML segment without assuming that matching inline start and end tags live in the same AST node.

func Validate

func Validate(fragment []byte) error

Validate parses and validates a fragment. It does not perform lossy rewriting: disallowed syntax is an error and must be rejected by the caller.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL