Functions
Javascript Function: strip_tags()
A useful function to mimic to PHP function strip_tags() to strip all HTML tags and markup from a string.
Useful when parsing client input on the fly. Extra checks should be added though.
SHARETHIS.addEntry({ title: “Javascript Function: strip_tags()”, url: “http://www.arkinex.com/javascript/js-functions/27/javascript-function-strip_tags/” });
Javascript Function: htmlentities()
Convert html tags and code to readable HTML entities. Mimics the PHP functions htmlspecialchars() and htmlentities().
Prevents from HTML script injection.
SHARETHIS.addEntry({ title: “Javascript Function: htmlentities()”, url: “http://www.arkinex.com/javascript/js-functions/26/javascript-function-htmlentities/” });
Javascript Function: array_search()
Was writing some javascript for a friend and developed these simple functions for searching javascript arrays.
Becomes pretty useful when your working with select html boxes and arrays in javascript.
SHARETHIS.addEntry({ title: “Javascript Function: array_search()”, url: “http://www.arkinex.com/javascript/js-functions/16/javascript-array-search-functions/” });
