Permalink
Browse files

don't die inside of escapeText

  • Loading branch information...
1 parent 8f433a5 commit 9ac78211a176ac366bfecc3d24f0c8c7b2d95244 Visnu Pitiyanuvath committed Jul 21, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 public/javascripts/hoptoad-notifier.js
@@ -172,6 +172,8 @@ var Hoptoad = {
},
escapeText: function(text) {
+ if (typeof(text) !== 'string' && text.toString)
+ text = text.toString();
return text.replace(/&/g, '&')
.replace(/</g, '&#60;')
.replace(/>/g, '&#62;')

0 comments on commit 9ac7821

Please sign in to comment.