Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improved Nodepie.#_decodeHTMLEntities

  • Loading branch information...
commit 6ae74c0c19986e50892cdc5ec1b9658bce25c13c 1 parent 3b1a2e3
@fb55 fb55 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/nodepie.js
View
3  lib/nodepie.js
@@ -108,7 +108,8 @@ NodePie.HTMLEntities = {
**/
NodePie._decodeHTMLEntities = function(text){
return text.replace(/&(.+?);/g, function(str, ent){
- return String.fromCharCode( ent[0]!='#' ? NodePie.HTMLEntities[ent] : ent[1]=='x' ? parseInt(ent.substr(2),16): parseInt(ent.substr(1)) )}
+ return String.fromCharCode( ent[0] !== '#' ? NodePie.HTMLEntities[ent] : ent[1] === 'x' ? parseInt(ent.substr(2),16) : parseInt(ent.substr(1), 10) );
+ }
);
};

0 comments on commit 6ae74c0

Please sign in to comment.
Something went wrong with that request. Please try again.