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 ¶
- func RiskilyAssumeHTML(s string) safehtml.HTML
- func RiskilyAssumeIdentifier(s string) safehtml.Identifier
- func RiskilyAssumeScript(s string) safehtml.Script
- func RiskilyAssumeStyle(s string) safehtml.Style
- func RiskilyAssumeStyleSheet(s string) safehtml.StyleSheet
- func RiskilyAssumeTrustedResourceURL(s string) safehtml.TrustedResourceURL
- func RiskilyAssumeURL(s string) safehtml.URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RiskilyAssumeHTML ¶
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 ¶
RiskilyAssumeScript converts a plain string into a Script. This function must only be used for refactoring legacy code.
func RiskilyAssumeStyle ¶
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 ¶
RiskilyAssumeURL converts a plain string into a URL. This function must only be used for refactoring legacy code.
Types ¶
This section is empty.