Core Function
View Source on Trac ↗ js_escape()
js_escape( mixed $text ) Escape single quotes, specialchar double quotes, and fix line endings.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $text string | The text to be escaped. Required |
Return Value
(string)
Escaped text.
Function Information
Since Version
2.0.4
Source File
wp-includes/deprecated.php
Advertisement