Module: ink/strings/html

ink/strings/html

These methods work with and manipulate html

Author:
  • Terry Weiss
  • zumbrunn
  • Esa-Matti Suurone
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
See NOTICE.md for licenses
ink-strings Copyright contributers to ink-strings, base64, Helma, RingoJS, sprintf projects.
Documentation generated by JSDoc 3.2.0-dev on Sun Jun 09 2013 11:56:08 GMT-0400 (EDT) using the DocStrap template.