These methods work with and manipulate html
- Source:
Methods
-
<static> entitize(string) → {String}
-
translates all characters of a string into HTML entities
Parameters:
Name Type Description string
String the string
- Source:
Returns:
translated result
- Type
- String
Example
var strings = require("ink-strings"); strings.entitize("test me"); -> "test me"
-
<static> escapeHtml(string) → {String}
-
Escape the string to make it safe for use within an HTML document.
Parameters:
Name Type Description string
String the string to escape
- Source:
Returns:
the escaped string
- Type
- String
-
<static> stripTags(string) → {String}
-
Remove all potential HTML/XML tags from this string
Parameters:
Name Type Description string
String the string
- Source:
Returns:
the processed string
- Type
- String
-
<static> unescapeHTML(str) → {string}
-
Converts entity characters to HTML equivalents.
Parameters:
Name Type Description str
string The string to work with
- Source:
Returns:
- Type
- string