package escapes

import "github.com/gobuffalo/plush/v5/helpers/escapes"

Index

Constants

const (
	JSEscapeKey   = "jsEscape"
	HTMLEscapeKey = "htmlEscape"
)

Keys to be used in templates for the functions in this package.

Variables

var JSEscape = template.JSEscapeString

JSEscape will escape a string for Javascript

Functions

func HTMLEscape

func HTMLEscape(s string, help hctx.HelperContext) (string, error)

HTMLEscape will escape a string for HTML

func New

func New() hctx.Map

New returns a map of the helpers within this package.

Source Files

escapes.go html.go js.go

Version
v5.0.5 (latest)
Published
May 23, 2025
Platform
linux/amd64
Imports
2 packages
Last checked
2 weeks ago

Tools for package owners.