Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #245 from lunfel/master
Handle null, undefined, etc
  • Loading branch information
kvz committed Oct 27, 2015
2 parents 5d5289a + c2dbbe2 commit f4bf92f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions functions/strings/htmlspecialchars.js
Expand Up @@ -25,6 +25,7 @@ function htmlspecialchars(string, quote_style, charset, double_encode) {
if (typeof quote_style === 'undefined' || quote_style === null) {
quote_style = 2;
}
string = string || '';
string = string.toString();
if (double_encode !== false) {
// Put this first to avoid double-encoding
Expand Down

0 comments on commit f4bf92f

Please sign in to comment.