legacyconversions

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Overview

Package legacyconversions provides functions to create values of package safehtml types from plain strings. This package is functionally equivalent to package uncheckedconversions, but is only intended for temporary use when upgrading code to use package safehtml types.

New code must not use the conversion functions in this package. Instead, new code should create package safehtml type values using the functions provided in package safehtml or package safehtml/template. If neither of these options are feasible, new code should request a security review to use the conversion functions in package safehtml/uncheckedconversions instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RiskilyAssumeHTML

func RiskilyAssumeHTML(s string) safehtml.HTML

RiskilyAssumeHTML converts a plain string into a HTML. This function must only be used for refactoring legacy code.

func RiskilyAssumeIdentifier

func RiskilyAssumeIdentifier(s string) safehtml.Identifier

RiskilyAssumeIdentifier converts a plain string into an Identifier. This function must only be used for refactoring legacy code.

func RiskilyAssumeScript

func RiskilyAssumeScript(s string) safehtml.Script

RiskilyAssumeScript converts a plain string into a Script. This function must only be used for refactoring legacy code.

func RiskilyAssumeStyle

func RiskilyAssumeStyle(s string) safehtml.Style

RiskilyAssumeStyle converts a plain string into a Style. This function must only be used for refactoring legacy code.

func RiskilyAssumeStyleSheet

func RiskilyAssumeStyleSheet(s string) safehtml.StyleSheet

RiskilyAssumeStyleSheet converts a plain string into a StyleSheet. This function must only be used for refactoring legacy code.

func RiskilyAssumeTrustedResourceURL

func RiskilyAssumeTrustedResourceURL(s string) safehtml.TrustedResourceURL

RiskilyAssumeTrustedResourceURL converts a plain string into a TrustedResourceURL. This function must only be used for refactoring legacy code.

func RiskilyAssumeURL

func RiskilyAssumeURL(s string) safehtml.URL

RiskilyAssumeURL converts a plain string into a URL. This function must only be used for refactoring legacy code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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