VuFind API Documentation

HtmlSafeJsonEncode extends AbstractHelper
in package

HTML-safe JSON encoding.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

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.

Return values
string

Search results