Encodes strings to make user input safer.
- Source:
Requires
Methods
-
(static) encode(raw) → {string}
-
Encodes a String with HTML entities. Solution adapted from: http://stackoverflow.com/questions/18749591
Parameters:
Name Type Description raw
* The raw value to encode, identity if not a String. - Source:
Returns:
An encoded string with HTML entities.- Type
- string