Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

esc_js()

3 tags 1 category

esc_js() — Escapes single quotes, “, <, >, &, and fixes line endings. Escapes text strings for echoing in JS. It is intended to be used for inline JS (in a tag attribute, for example onclick=”…”). Note that the strings have to be in single quotes. The {

Inputs: $text (string|int|float): The text to be escaped.

Returns string: Escaped text.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…