Skip to content

Commit

Permalink
htmlentities method added (for #533)
Browse files Browse the repository at this point in the history
  • Loading branch information
V1RTUOZ committed Mar 17, 2015
1 parent 620c004 commit 657694d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/javascripts/common.js
Expand Up @@ -894,6 +894,17 @@ var Common = (function () {
}

};

/**
* Convert all applicable characters to HTML entities
* @public
* @param {string} cb
* @return {string}
*/
self.htmlentities = function(s) {
return $('<div/>').text(s + '').html();
};



/**
Expand Down

0 comments on commit 657694d

Please sign in to comment.