xmlutil

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package xmlutil provides XML escaping utilities for prompt injection prevention.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Escape

func Escape(s string) string

Escape replaces characters with special meaning in XML to prevent prompt injection when embedding user content in XML-delimited templates. Invalid UTF-8 sequences are replaced with the Unicode replacement character (U+FFFD) before escaping so that xml.EscapeText never fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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