HtmlSafeJsonEncode
extends AbstractHelper
in package
HTML-safe JSON encoding.
Tags
Table of Contents
- __invoke() : string
- JSON-encode $value in an HTML-safe manner.
Methods
__invoke()
JSON-encode $value in an HTML-safe manner.
public
__invoke(mixed $value[, string|null $outerEscaper = 'escapeHtmlAttr' ]) : string
Parameters
- $value : mixed
-
Data to encode
- $outerEscaper : string|null = 'escapeHtmlAttr'
-
Name of a view helper to use to escape the JSON (null/empty value for no extra escaping). Defaults to escapeHtmlAttr.